diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-24 09:37:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-24 09:38:19 +0100 |
commit | 17189e8e63254dbe5e4c9c755a4817664e4ee0d5 (patch) | |
tree | 67ae5e4e282835f21ba82c8002775ac30730e40a /vcl/workben/fftester.cxx | |
parent | ed49818ab0af63f3246e8c27ba87aef4d9fbb829 (diff) |
tweak fftester to upscale everything to 24bits...
to flush out color index problems
Change-Id: Ifc7a56e0938eb10d82dc880e94ac09062d239ce1
Diffstat (limited to 'vcl/workben/fftester.cxx')
-rw-r--r-- | vcl/workben/fftester.cxx | 80 |
1 files changed, 57 insertions, 23 deletions
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 13acc9aedf9e..dda8367d9786 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -106,42 +106,54 @@ try_again: GDIMetaFile aGDIMetaFile; SvFileStream aFileStream(out, StreamMode::READ); ret = (int) ReadWindowMetafile(aFileStream, aGDIMetaFile); + BitmapEx aTarget; + aGDIMetaFile.CreateThumbnail(aTarget); } else if (strcmp(argv[2], "jpg") == 0) { Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); ret = (int) ImportJPEG(aFileStream, aGraphic, nullptr, GraphicFilterImportFlags::NONE); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "gif") == 0) { SvFileStream aFileStream(out, StreamMode::READ); Graphic aGraphic; ret = (int) ImportGIF(aFileStream, aGraphic); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "xbm") == 0) { Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); ret = (int) ImportXBM(aFileStream, aGraphic); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "xpm") == 0) { Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); ret = (int) ImportXPM(aFileStream, aGraphic); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "png") == 0) { SvFileStream aFileStream(out, StreamMode::READ); vcl::PNGReader aReader(aFileStream); - aReader.Read(); + BitmapEx aTarget = aReader.Read(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "bmp") == 0) { Bitmap aTarget; SvFileStream aFileStream(out, StreamMode::READ); ret = (int) ReadDIB(aTarget, aFileStream, true); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "svm") == 0) { @@ -160,9 +172,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "dxf") == 0) { @@ -175,9 +189,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "met") == 0) { @@ -190,9 +206,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if ((strcmp(argv[2], "pbm") == 0) || strcmp(argv[2], "ppm") == 0) { @@ -205,9 +223,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "psd") == 0) { @@ -220,9 +240,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "eps") == 0) { @@ -235,9 +257,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "pct") == 0) { @@ -250,9 +274,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "pcx") == 0) { @@ -265,9 +291,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "ras") == 0) { @@ -280,9 +308,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "tga") == 0) { @@ -295,9 +325,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if (strcmp(argv[2], "tif") == 0) { @@ -310,9 +342,11 @@ try_again: aLibrary.getFunctionSymbol("GraphicImport")); aLibrary.release(); } - Graphic aTarget; + Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr); + ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr); + BitmapEx aTarget = aGraphic.GetBitmapEx(); + aTarget.Convert(BMP_CONVERSION_24BIT); } else if ( (strcmp(argv[2], "doc") == 0) || (strcmp(argv[2], "ww8") == 0) || |