thumbnails
Posted: 20 Sep 2015 13:30
in latest version
So XY algorithm likely treats FF FF as a segment marker (wrong) and FF E0 as size (also wrong). The correct way is to skip all FF bytes until we get something other than FF FF (in our case FF E0).Any marker may optionally be preceded by any number of fill bytes, which are bytes assigned code X’FF’.
Sure! That was a bug. It's fixed now. You might need to redo your cache to get rid of it.yusef88 wrote:isn't displaying icon for items that don't have thumbnails better than this message?
Thanks, man! I will pimp my logic...xman wrote:Here is what makes that image different from most JPEGs around.
Every JPEG file consists of a bunch of segments, one after another. These segments start with 2 byte marker (of which first byte is always FF), followed by 2-byte value (which gives us size of these 2 bytes plus size of data to follow), followed by data (if size > 2).
Some segments don't contain size and data, just the 2-byte marker. This is the case for FF D8 (always first segment of an image), FF D9 (always the last segment of an image) and also for so-called restart markers, which I won't get into here.
Here is how the provided JPEG looks like:
FF D8 (start of image)
FF E1 (APP1 segment, contains Exif) 59 0B (size of exif data to follow, plus 2) 45 78 ... B4 47 FF D9 (exif data)
FF D9 (unknown APP5 segment) 01 FE (size of data, plus 2) FB BA .. 00 00 (data)
now we have something interesting:
FF FF FF E0 --> FF E0 is a start of an APP0 segment, but what are those FFs before that?
Those are so called fill bytes. Any marker segment may be preceded by one or more FF bytes. Or, quoting directly from JPEG specification (page 35, http://www.w3.org/Graphics/JPEG/itu-t81.pdf):So XY algorithm likely treats FF FF as a segment marker (wrong) and FF E0 as size (also wrong). The correct way is to skip all FF bytes until we get something other than FF FF (in our case FF E0).Any marker may optionally be preceded by any number of fill bytes, which are bytes assigned code X’FF’.
If you remove those two FF bytes, image is then correctly displayed.
The request to add support of the built-in thumbnails for the TIFF files. As far as I know, now only Adobe Bridge works with the built-in thumbnails of TIFF, it is good if XYplorer too learns to show the built-in thumbnails for the TIFF files.For most JPEG images created by phones or digital cameras, the thumbnail image (if present) is stored in the APP1 marker (FFE1). Inside this marker segment is a TIFF file containing the EXIF information for the main image and the optional thumbnail image stored as a JPEG compressed image. The TIFF file usually contains two "pages" where the first page is the EXIF info and the second page is the thumbnail stored in the "old" TIFF type 6 format. Type 6 format is when a JPEG file is just stored as-is inside of a TIFF wrapper.
The wikipedia page on JFIF at http://en.wikipedia.org/wiki/JPEG_File_ ... nge_Format gives a good description of the JPEG Header(the header contains the thumbnail as an uncompressed raster image).
OS: Windows 7 Home Basic (Service Pack 1), 32-bit (6.1)admin wrote:Which Windows?