Recent comments

Reply to: unpack_thumb unpacks previews instead   10 months 2 days ago

We don't know of a general answer to this question that will always work.
For example:

  • Some previews (on some cameras) contain a black border on the right/left, which is not part of the RAW image, so no pixel in RAW corresponds to the left-top (or any) preview image corner.
  • The lens geometry correction has been applied to the preview, so its edges do not correspond to any straight horizontal/vertical line in the RAW
  • Aspect ratio in the preview may be not exactly the same as RAW image area.

In some cases imgdata.sizes.raw_inset_crops[..] may work.

Reply to: unpack_thumb unpacks previews instead   10 months 2 days ago

Dear Alex,
first of all, many thanks for the wonderful libraw and your effort.

I'm currently dealing with Canon R5 CR3.
I can sucessfully decode the largest thumbnail(JPEG 1620x1080) using this following code.
//--------------------
rawp->unpack_thumb_ex(1);
rawimgthumb = rawp->dcraw_make_mem_thumb(&err); //store unpacked and processed raw image

Mat rawData(1, rawimgthumb->data_size, CV_8UC1, (void*)rawp->imgdata.thumbnail.thumb);
thumbimg_file = imdecode(rawData, 1); //BGR
//--------------------

Howerver, it seems that the start pxiel(left-top conner) of the decoded thumbnail image is not the same of the start pixel of the raw image(8191x5463 or with frame 8352x5586).

How can we match the exackt position between the thumbnail and the raw image?
Is there any parameter about the croping region of the thumbnail from raw image?

Thank you for your response in advance.

Kim

Reply to: Write image data to standard output   10 months 5 days ago

The file is a lossy compressed dng image. I have attached it here, https://drive.google.com/file/d/18QaZiL_YBEXwrmKd9638zHuWpOo54V5y/view

I have compiled in 32-bit with USE_JPEG enabled, linked with libjpeg library

I was able to decode using "-Z -". But adding additional options such as " -w -H 0 -o 0 -Z -" prints "Request for nonexisting image number"

Reply to: Write image data to standard output   10 months 5 days ago

Generally, there shouldn't be a difference between 32- and 64-bit versions.
In practice, 32-bit builds have not been tested for a long time.

Could you please provide the RAW file you're testing with: for analysis

Reply to: Write image data to standard output   10 months 5 days ago

tried the 64-bit version and it worked fine, but using the compiled 32-bit version had issue. don't know why. i'll try to investigate on this more (maybe some configuration issues on my side). are there difference between 64 and 32?

Reply to: Write image data to standard output   10 months 5 days ago

Works for me: dcraw_emu.exe -t 5 -Z - filename >0.ppm
(-T ... > 0.tif works too)

Reply to: Write image data to standard output   10 months 5 days ago

I have tried to add some options like "-t 5 -Z -" (flip 90 CCW and output to stdout), but it seems like it doesn't apply the flip on the output. am i missing something?

Reply to: Write image data to standard output   10 months 5 days ago

"-Z -" command worked great for me! Thanks a lot!

Reply to: Write image data to standard output   10 months 5 days ago

dcraw_emu w/o args displays:

-Z Output filename generation rules
.suf => append .suf to input name, keeping existing suffix too
suf => replace input filename last extension
- => output to stdout
filename.suf => output to filename.suf

is that what you were asking about?

Reply to: libraw unable to open dng file   10 months 6 days ago

Posting the solution here if ever someone encounters the same issue,

apparently, in the VS project of LibRaw, you need to make the 'Struct Member Alignment' in the project properties the same with the generated library of libjpeg

having different settings results to unequal struct size between libjpeg and libraw (JERR_BAD_STRUCT_SIZE)

Reply to: libraw with Adobe DNG SDK problem   10 months 1 week ago

Have you tried building a dng_validate example from DNG SDK?

Your error screenshot lists missing symbols from XMPCore library, that's why I'm pretty sure you didn't add it to the your build.

Reply to: libraw unable to open dng file   10 months 1 week ago

Sorry we can't help with libjpeg issues

Reply to: libraw unable to open dng file   10 months 1 week ago

I have tried to build libraw as you suggested with USE_JPEG and USE_JPEG8, I have also built it with and without USE_ZLIB just in case.

I was able to open_buffer but when I raw_unpack, it throws an exception on lossy_dng_load_raw -> jpeg_create_decompress. on this line,

uSize = SIZEOF(struct jpeg_decompress_struct);
if (structsize != uSize)
ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
(int) SIZEOF(struct jpeg_decompress_struct), (int) structsize);

Not sure why I'm getting this error :(

Reply to: libraw unable to open dng file   10 months 2 weeks ago

Why ask things that you can check yourself in a minute?

Yes, it will decode (so called) 'raw image data', but in this specific case it is not RAW, but processed 8-bit/3channel data with only 256 different values per channel.

Embedded JPEG previews are not decoded by LibRaw but provided as is (JPEG bytearray)

Reply to: libraw unable to open dng file   10 months 2 weeks ago

Will it also decode the high resolution raw image data? or just the internal embedded jpeg image?

Reply to: libraw unable to open dng file   10 months 2 weeks ago

LibRaw 0.21 supports this file if built with -DUSE_JPEG -DUSE_JPEG8 and linked with libjpeg (or replacement) library

Reply to: libraw with Adobe DNG SDK problem   10 months 2 weeks ago

Do you mean in the dng sdk build? As stated in the dng sdk readme,

"XMP SDK

Building DNG SDK requires the XMP SDK. This package includes the XMP
SDK headers and pre-built static libraries for Mac OS (64-bit) and
Windows (32-bit and 64-bit). Thus if you plan to build the DNG SDK on
Mac OS using Xcode and/or on Windows using Visual Studio/C++, no
further action is needed."

I'm not sure how to include it in the project as it said no further action is needed in Windows.

Reply to: libraw unable to open dng file   10 months 2 weeks ago

Sorry about that, I have changed to public, here is the link
https://drive.google.com/file/d/18QaZiL_YBEXwrmKd9638zHuWpOo54V5y/view?u...

Reply to: libraw with Adobe DNG SDK problem   10 months 2 weeks ago

Looks like you have not added required XMP SDK (XMPCore) to your build.

Reply to: libraw unable to open dng file   10 months 2 weeks ago

The link you provided is not for everyone, but asks for 'request access permissions'.

Please change to public

Reply to: Panasonic Lumix S5 ii   10 months 2 weeks ago

We do not provide direct user support for other's end user products (with the exception of ours end-user products, of course). If Affinity takes money from its users, they should be engaged in support without throwing this ball to us.

LibRAW is targeted to developers, we're ready to provide support for Affinity team, but they never contacted us.

Please send this link to Affinity team: https://www.libraw.org/extended-support

Also, you may just wait: Panasonic DC-S5 II is supported since March, 2023; We'll release it in public snapshot according to our release schedule: https://www.libraw.org/#updatepolicy

Reply to: Z 9 HE/HE* formats support plans   10 months 4 weeks ago

We're working on it but there is no estimated completion date.

HE/HE* will definitely NOT be supported in the next public snapshot.

Reply to: LibRaw 0.21 supported cameras   11 months 3 days ago

If you're a software vendor: please consider extended support/early access option.

If you are just a user of some program - please inform your vendor about the possibility of access to early support for new cameras.

Reply to: LibRaw 0.21 supported cameras   11 months 3 days ago

what do you think? How long do I have to wait?

Pages