Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version 21 Likes Search this Thread
04-16-2020, 02:08 AM   #76
Loyal Site Supporter
Loyal Site Supporter
fs999's Avatar

Join Date: Jul 2008
Location: Luxembourg
Photos: Gallery
Posts: 8,645
QuoteOriginally posted by acoufap Quote
Do you know how to extract it using Exiftool? - I only know how to extract the 720 x 480px preview.
QuoteOriginally posted by acoufap Quote
This command I use all the time and it works - since years:

exiftool -b -previewimage -w previews/%d%f_.jpg -ext DNG .


The usual command to get a full sized jpg should be the following:

exiftool -b -JpgFromRaw -w thumbsAndPreviews/%d%f_.jpg -ext DNG .

But this doesn't work.


Of course I tried your other suggestions using DNG files from K-5, KP and K-1.

They simply don't work ... I tested them as follows:

exiftool -b -ThumbnailImage -w thumbnails/%d%f_.jpg -ext DNG .

=> no image creation

exiftool -a -w thumbsAndPreviews/%d%f_.jpg -ext DNG .

=> The -a command simply dumps the existing meta data


In which way do you use these commands exactly using raw files from which Pentax DSLR?
In my PentSig program I try :
  1. to extract the thumbnail from shell object helper : GetExtractImageItfPtr and ExtractImageGetFileThumbnail
  2. if it fails I use exiftool with this command : exiftool -b -Preview:PreviewImage filename
The only problem is the thumbnail is always horizontal, so to display it correctly I use following command :
exiftool -g -g -a filename
then I try to find the line "Orientation" and if there isn't "Horizontal (normal)" on that line then I rotate the image 90°.


04-16-2020, 05:54 AM   #77
Site Supporter
Site Supporter
acoufap's Avatar

Join Date: Jan 2011
Location: Munich, Germany
Photos: Gallery | Albums
Posts: 4,190
QuoteOriginally posted by jbinpg Quote
Thanks for doing the dirty work. All developers need bug reports to improve the product.
It was an user error!

Phil Harvey posted a question and used the following command to show which previews can be extracted:

> exiftool Pentax* Ricoh* -ext dng -ext pef -preview:all -a -G4 -s

The results for my test cases opened my eyes ...

======== ./IMGP6562.DNG
[Copy1] PreviewImage : (Binary data 2818959 bytes, use -b option to extract)
[] PreviewImage : (Binary data 54100 bytes, use -b option to extract)
[] ThumbnailTIFF : (Binary data 57816 bytes, use -b option to extract)

======== ./20190422_09-37-30_KP_SC3654.PEF
[] JpgFromRaw : (Binary data 2829512 bytes, use -b option to extract)
[] PreviewImage : (Binary data 55587 bytes, use -b option to extract)
[] ThumbnailImage : (Binary data 7115 bytes, use -b option to extract)

Until now I thought that the command should be the same for PEF and DNG. But the results for PEF and DNG show significant differences.

For Pentax DNG I have to modify my commands concerning full-size and thumbnail image extraction! - So no Bug in Exiftool but a user fault! (sorry)

Extracts a full-size JPG:

PEF > exiftool -b -JpgFromRaw -w fullsizepreview/%d%f_.jpg ./anImage.PEF
DNG > exiftool -b -Copy1:PreviewImage -w fullsizepreview/%d%f_.jpg ./anImage.DNG

Exracts a thumbnail JPG:

PEF > exiftool -b -ThumbnailImage -w %d%f_thumbnail.jpg anImage.PEF
DNG > exiftool -b -ThumbnailTIFF -w %d%f_fullsize.jpg anImage.DNG

For preview-size works for PEF and DNG the same.

PEF > exiftool -b -PreviewImage -w %d%f_previewsize.jpg anImage.PEF
DNG > exiftool -b -PreviewImage -w %d%f_previewsize.jpg anImage.DNG

Last edited by acoufap; 04-16-2020 at 11:07 AM.
04-16-2020, 06:03 AM   #78
Site Supporter
Site Supporter
acoufap's Avatar

Join Date: Jan 2011
Location: Munich, Germany
Photos: Gallery | Albums
Posts: 4,190
QuoteOriginally posted by fs999 Quote
In my PentSig program I try :
  1. to extract the thumbnail from shell object helper : GetExtractImageItfPtr and ExtractImageGetFileThumbnail
  2. if it fails I use exiftool with this command : exiftool -b -Preview:PreviewImage filename
The only problem is the thumbnail is always horizontal, so to display it correctly I use following command :
exiftool -g -g -a filename
then I try to find the line "Orientation" and if there isn't "Horizontal (normal)" on that line then I rotate the image 90°.
Thank you! - Have a look at my newest finding after conversion with Phil Harvey. I posted it a few minutes ago - interesting.
04-16-2020, 11:02 AM - 1 Like   #79
Loyal Site Supporter
Loyal Site Supporter
fs999's Avatar

Join Date: Jul 2008
Location: Luxembourg
Photos: Gallery
Posts: 8,645
QuoteOriginally posted by acoufap Quote
Thank you! - Have a look at my newest finding after conversion with Phil Harvey. I posted it a few minutes ago - interesting.
Will look at it. But mine is working too (-Preview:PreviewImage)

04-16-2020, 11:47 PM   #80
Site Supporter
Site Supporter




Join Date: Mar 2008
Location: Prince George, BC
Photos: Gallery | Albums
Posts: 3,546
Ah! Thanks, Acoufap. In my defence, the man page entries for the -g and -G options are sufficiently dense that I would never have figured it out without help from the author

$ exiftool -preview:all -a -G4 -s K1A_7888.PEF
[] JpgFromRaw : (Binary data 4515681 bytes, use -b option to extract)
[] PreviewImage : (Binary data 55854 bytes, use -b option to extract)
[] ThumbnailImage : (Binary data 7663 bytes, use -b option to extract)

$ exiftool -preview:all -a -G4 -s K3A_0947.DNG
[Copy1] PreviewImage : (Binary data 2909642 bytes, use -b option to extract)
[] PreviewImage : (Binary data 50864 bytes, use -b option to extract)
[] ThumbnailTIFF : (Binary data 57816 bytes, use -b option to extract)
04-17-2020, 12:19 PM   #81
Site Supporter
Site Supporter
acoufap's Avatar

Join Date: Jan 2011
Location: Munich, Germany
Photos: Gallery | Albums
Posts: 4,190
QuoteOriginally posted by jbinpg Quote
Ah! Thanks, Acoufap. In my defence, the man page entries for the -g and -G options are sufficiently dense that I would never have figured it out without help from the author

$ exiftool -preview:all -a -G4 -s K1A_7888.PEF
[] JpgFromRaw : (Binary data 4515681 bytes, use -b option to extract)
[] PreviewImage : (Binary data 55854 bytes, use -b option to extract)
[] ThumbnailImage : (Binary data 7663 bytes, use -b option to extract)

$ exiftool -preview:all -a -G4 -s K3A_0947.DNG
[Copy1] PreviewImage : (Binary data 2909642 bytes, use -b option to extract)
[] PreviewImage : (Binary data 50864 bytes, use -b option to extract)
[] ThumbnailTIFF : (Binary data 57816 bytes, use -b option to extract)
I'm happy that I could clarify this. Since I joined exiftool forum there's now another info availlable for Pentax DSLR users. Maybe you're interested. I just opened a thread about it.
04-17-2020, 06:05 PM   #82
Site Supporter
Site Supporter
BruceBanner's Avatar

Join Date: Dec 2015
Posts: 5,405
Original Poster
QuoteOriginally posted by stevebrot Quote
I had a chance to play with PixelShift2DNG and with the files it generates. The talking points go like this:
  • The DNG files appear to be well-formed and are compatible with RawDigger, Lightroom 6.14, PDCU 5.8.1, and dcraw 9.28 on my workstation.
  • Compatibility is poor with Affinity Photo 1.8.2.620 and PaintShop Pro X6.
  • The format is something called DNG Linear Raw (aka Linear DNG) which is the packaging of non-RAW, partially-processed image data in the DNG in place of camera-generated RAW data. The data are in the form of RGB pixels based on extracted values from the four pixel-shifted captures, but without application of white balance or color profile and are "scene referred"*. Near as I can tell, the data are equivalent to a linear TIFF** and a good approximation of the original RAW data.
  • Sufficient Pentax-specific metadata is retained such that when opened in PDCU or imported into Lightroom, the files are treated similar to if they were a single image capture from a Pentax camera.
  • Bottom line is that PixelShift2DNG, while not fully equivalent to a RAW capture has similar flexibility with compatible tools and equivalent to working from a linear TIFF.
Enjoy!


Steve

* I will let the good folk at CIE explain what "scene-referred" means... image state, scene-referred | eilv

** A linear TIFF is the result of RAW processing with no white balance, normalization curves, colorspace, or color profiles applied. The results are ugly, but pure. I use dcraw to create linear TIFFs.
Thanks for doing this Steve.

So my findings is that LR can indeed handle and process pixelshifted files now, so long as motion correction is not needed. In my preliminary testing I am seeing LR doing a better job with the native pixelshift DNG file than the DNG file that PS2DNG outputted. Be curious to know if you feel similarly. Basically I am no longer sure this PS2DNG is needed at all..

04-18-2020, 03:34 PM - 1 Like   #83
Otis Memorial Pentaxian
stevebrot's Avatar

Join Date: Mar 2007
Location: Vancouver (USA)
Photos: Gallery | Albums
Posts: 42,007
QuoteOriginally posted by BruceBanner Quote
Be curious to know if you feel similarly. Basically I am no longer sure this PS2DNG is needed at all..
My pixel shift experience has mostly just been forensic using example images from the Web. LR does a good job except that when there is motion, say wind on grass, the artifact is pretty severe. I consider the main benefit of PixelShift2DNG as being when PP tool of choice does not support PS, but does support DNG Linear RAW.


Steve
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
benefit, correction, dcraw, dng, files, frame, frames, icon, image, images, lr, motion, pentax, photography, photoshop, pixel, pixelshift, pixelshift to dng/libraw, profile, rawtherapee, shift, shot, software, tiff, time

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adobe DNG vs Pentax's DNG dflorez Digital Processing, Software, and Printing 8 12-07-2015 11:34 AM
Start the buisness, sole proprietorship or LLC ?? ChallengedOne General Talk 4 04-23-2011 09:24 PM
Linux -- Ubuntu Karmic 9.10, libraw 0.8.5, Raw file processing K7er Digital Processing, Software, and Printing 4 01-13-2010 08:35 PM
DNG in-camera vs DNG from Lightroom? rfortson Digital Processing, Software, and Printing 9 11-02-2008 11:06 PM



All times are GMT -7. The time now is 06:25 AM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top