SOL9 Sample: ImageEncoders
|
1 Screenshot
2 Source code
/*
* ImageEncoders.cpp
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// 2012/04/10
#include <sol\gdiplus\GdiplusInitializer.h>
#include <sol\gdiplus\ImageEncoders.h>
void _tmain(int argc, TCHAR* argv[])
{
GdiplusInitializer initializer;
{
ImageEncoders encoders;
encoders.display();
wchar_t* names[] = {L"Bmp", L"GIF", L"JPeg", L"PNG", L"Tiff", L"Ico", L"JPG"};
for (int i = 0; i<SizeOf(names); i++) {
Gdiplus::ImageCodecInfo* jpgCodec = encoders.getEncoderByName(names[i]);
if (jpgCodec) {
wprintf(L"Name:%s -> Found a codec=%s\n", names[i], jpgCodec->CodecName);
} else {
wprintf(L"Name:%s -> Not found a codec\n", names[i]);
}
}
}
}
Last modified: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.