comparison Plugins/Engine/OrthancPlugins.cpp @ 2908:9d277f8ad698

new enumeration: MimeType
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Oct 2018 16:16:07 +0100
parents 7133ad478eea
children 4767d36679ed
comparison
equal deleted inserted replaced
2907:0204af4ece6a 2908:9d277f8ad698
1365 { 1365 {
1366 case OrthancPluginImageFormat_Png: 1366 case OrthancPluginImageFormat_Png:
1367 { 1367 {
1368 PngWriter writer; 1368 PngWriter writer;
1369 writer.WriteToMemory(compressed, accessor); 1369 writer.WriteToMemory(compressed, accessor);
1370 translatedOutput->SetContentType("image/png"); 1370 translatedOutput->SetContentType(MimeType_Png);
1371 break; 1371 break;
1372 } 1372 }
1373 1373
1374 case OrthancPluginImageFormat_Jpeg: 1374 case OrthancPluginImageFormat_Jpeg:
1375 { 1375 {
1376 JpegWriter writer; 1376 JpegWriter writer;
1377 writer.SetQuality(p.quality); 1377 writer.SetQuality(p.quality);
1378 writer.WriteToMemory(compressed, accessor); 1378 writer.WriteToMemory(compressed, accessor);
1379 translatedOutput->SetContentType("image/jpeg"); 1379 translatedOutput->SetContentType(MimeType_Jpeg);
1380 break; 1380 break;
1381 } 1381 }
1382 1382
1383 default: 1383 default:
1384 throw OrthancException(ErrorCode_ParameterOutOfRange); 1384 throw OrthancException(ErrorCode_ParameterOutOfRange);