mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 19:50:38 +08:00
Merge pull request #4206 from sturkmen72:patch-2
This commit is contained in:
commit
76296fb672
@ -1874,21 +1874,38 @@ static void showSaveDialog(CvWindow* window)
|
|||||||
ofn.lStructSize = sizeof(ofn);
|
ofn.lStructSize = sizeof(ofn);
|
||||||
#endif
|
#endif
|
||||||
ofn.hwndOwner = window->hwnd;
|
ofn.hwndOwner = window->hwnd;
|
||||||
ofn.lpstrFilter = "Portable Network Graphics files (*.png)\0*.png\0"
|
ofn.lpstrFilter =
|
||||||
"JPEG files (*.jpeg;*.jpg;*.jpe)\0*.jpeg;*.jpg;*.jpe\0"
|
#ifdef HAVE_PNG
|
||||||
|
"Portable Network Graphics files (*.png)\0*.png\0"
|
||||||
|
#endif
|
||||||
"Windows bitmap (*.bmp;*.dib)\0*.bmp;*.dib\0"
|
"Windows bitmap (*.bmp;*.dib)\0*.bmp;*.dib\0"
|
||||||
|
#ifdef HAVE_JPEG
|
||||||
|
"JPEG files (*.jpeg;*.jpg;*.jpe)\0*.jpeg;*.jpg;*.jpe\0"
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_TIFF
|
||||||
"TIFF Files (*.tiff;*.tif)\0*.tiff;*.tif\0"
|
"TIFF Files (*.tiff;*.tif)\0*.tiff;*.tif\0"
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_JASPER
|
||||||
"JPEG-2000 files (*.jp2)\0*.jp2\0"
|
"JPEG-2000 files (*.jp2)\0*.jp2\0"
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_WEBP
|
||||||
"WebP files (*.webp)\0*.webp\0"
|
"WebP files (*.webp)\0*.webp\0"
|
||||||
|
#endif
|
||||||
"Portable image format (*.pbm;*.pgm;*.ppm;*.pxm;*.pnm)\0*.pbm;*.pgm;*.ppm;*.pxm;*.pnm\0"
|
"Portable image format (*.pbm;*.pgm;*.ppm;*.pxm;*.pnm)\0*.pbm;*.pgm;*.ppm;*.pxm;*.pnm\0"
|
||||||
|
#ifdef HAVE_OPENEXR
|
||||||
"OpenEXR Image files (*.exr)\0*.exr\0"
|
"OpenEXR Image files (*.exr)\0*.exr\0"
|
||||||
|
#endif
|
||||||
"Radiance HDR (*.hdr;*.pic)\0*.hdr;*.pic\0"
|
"Radiance HDR (*.hdr;*.pic)\0*.hdr;*.pic\0"
|
||||||
"Sun raster files (*.sr;*.ras)\0*.sr;*.ras\0"
|
"Sun raster files (*.sr;*.ras)\0*.sr;*.ras\0"
|
||||||
"All Files (*.*)\0*.*\0";
|
"All Files (*.*)\0*.*\0";
|
||||||
ofn.lpstrFile = szFileName;
|
ofn.lpstrFile = szFileName;
|
||||||
ofn.nMaxFile = MAX_PATH;
|
ofn.nMaxFile = MAX_PATH;
|
||||||
ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_NOREADONLYRETURN | OFN_NOCHANGEDIR;
|
ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_NOREADONLYRETURN | OFN_NOCHANGEDIR;
|
||||||
|
#ifdef HAVE_PNG
|
||||||
ofn.lpstrDefExt = "png";
|
ofn.lpstrDefExt = "png";
|
||||||
|
#else
|
||||||
|
ofn.lpstrDefExt = "bmp";
|
||||||
|
#endif
|
||||||
|
|
||||||
if (GetSaveFileName(&ofn))
|
if (GetSaveFileName(&ofn))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user