Now also exports the JPEG thumbnails as images using the translator service :-)
Note, this did not work with an older libtranslation.so from Haiku, so it might also not work correctly on BeOS. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20578 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
580d7b0441
commit
0663933acc
@ -8,6 +8,8 @@
|
||||
#include "ConfigView.h"
|
||||
#include "RAW.h"
|
||||
|
||||
#include <TranslatorRoster.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -180,8 +182,12 @@ RAWTranslator::DerivedTranslate(BPositionIO* source,
|
||||
image_data_info data;
|
||||
raw.ImageAt(imageIndex, data);
|
||||
|
||||
if (!data.is_raw)
|
||||
return B_NO_TRANSLATOR;
|
||||
if (!data.is_raw) {
|
||||
// let others handle embedded JPEG data
|
||||
BMemoryIO io(buffer, bufferSize);
|
||||
BTranslatorRoster* roster = BTranslatorRoster::Default();
|
||||
return roster->Translate(&io, NULL, settings, target, outType);
|
||||
}
|
||||
|
||||
uint32 dataSize = data.output_width * 4 * data.output_height;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user