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:
@@ -8,6 +8,8 @@
|
|||||||
#include "ConfigView.h"
|
#include "ConfigView.h"
|
||||||
#include "RAW.h"
|
#include "RAW.h"
|
||||||
|
|
||||||
|
#include <TranslatorRoster.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -180,8 +182,12 @@ RAWTranslator::DerivedTranslate(BPositionIO* source,
|
|||||||
image_data_info data;
|
image_data_info data;
|
||||||
raw.ImageAt(imageIndex, data);
|
raw.ImageAt(imageIndex, data);
|
||||||
|
|
||||||
if (!data.is_raw)
|
if (!data.is_raw) {
|
||||||
return B_NO_TRANSLATOR;
|
// 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;
|
uint32 dataSize = data.output_width * 4 * data.output_height;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user