ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: srwuser on June 28, 2018, 06:08:10 PM

Title: JPG from raw squeezed after tags transfer from SRW file
Post by: srwuser on June 28, 2018, 06:08:10 PM
I'm trying to extract JPG from raw SRW file, but after transfer of tags from SRW to JPG image is getting squeezed by X axis.
Here is a command I'm using:
exiftool -if '$jpgfromraw' -b -jpgfromraw -w %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg -overwrite_original -common_args --ext jpg .
Extracted JPG (result of jpgfromraw, without tagsfromfile) looks fine and became weirdly squeezed only after tags transfer.
That's probably a problem with orientation because another photo in portrait orientation looks ok.
ExifTool version is 11.03, OS is macOS High Sierra

Can't attach images, so I've uploaded them to dropbox:
https://www.dropbox.com/sh/n7jgzedfby8371v/AABcCndyUCxRFYyIVLcLEbpDa?dl=0
Title: Re: JPG from raw squeezed after tags transfer from SRW file
Post by: srwuser on June 28, 2018, 06:09:32 PM
and yeah, JPG looks squeezed only in some programs, e.g. XnViewMP
Title: Re: JPG from raw squeezed after tags transfer from SRW file
Post by: Phil Harvey on June 28, 2018, 10:32:47 PM
I can't look right now, but the only things I can think of that could potentially distort the image like that are the EXIF Orientation and XResolution/YResolution.

- Phil
Title: Re: JPG from raw squeezed after tags transfer from SRW file
Post by: StarGeek on June 29, 2018, 12:05:37 AM
Yeah, the resolution tags in the raw are really odd
C:\>exiftool -g1 -a -s -*resolu* "Y:\!temp\05060009.SRW"
---- PreviewIFD ----
XResolution                     : 0.9837400966
YResolution                     : 20.89618535
ResolutionUnit                  : inches
---- SubIFD ----
XResolution                     : 0.4627069715
YResolution                     : 0.1095343364
ResolutionUnit                  : inches
XResolution                     : 2723.2375
YResolution                     : 112.0023346
ResolutionUnit                  : inches
Title: Re: JPG from raw squeezed after tags transfer from SRW file
Post by: srwuser on July 02, 2018, 06:05:23 AM
All RAW files from my Samsung NX500 camera have the same weird resolution in inches.  :(
Are there any possible workaround? Like "transfer all tags except orientation"?
Title: Re: JPG from raw squeezed after tags transfer from SRW file
Post by: StarGeek on July 02, 2018, 10:54:04 AM
I'd suggest not copying the X/YResolution tags.  Add --XResolution --YResolution after the -TagsFromFile option.  Note the double minus signs.