lovasoa/pff-extract

Unable to open tile X, Premature end of JPEG file

Closed this issue · 8 comments

First of all I want to thank you for the contribution!
Nevertheless I get an error extracting the .pff file even with your ZoomifyImageExample3.pff file (https://github.com/lovasoa/pff-extract/files/4083159/ZoomifyImageExample3.pff.gz). I only get one image.
I get the following output:

version: 0x6a
size: 3000 x 2929
number of tiles: 194

Unable to open tile 0 as a JPEG file: Premature end of JPEG file

Unable to open tile 1 as a JPEG file: Premature end of JPEG file

Unable to open tile 2 as a JPEG file: Premature end of JPEG file

Unable to open tile 3 as a JPEG file: Premature end of JPEG file

Unable to open tile 4 as a JPEG file: Premature end of JPEG file

Unable to open tile 5 as a JPEG file: Premature end of JPEG file

Unable to open tile 6 as a JPEG file: Premature end of JPEG file

Unable to open tile 7 as a JPEG file: Premature end of JPEG file

Unable to open tile 8 as a JPEG file: Premature end of JPEG file

Unable to open tile 9 as a JPEG file: Premature end of JPEG file

Unable to open tile 10 as a JPEG file: Premature end of JPEG file

Unable to open tile 11 as a JPEG file: Premature end of JPEG file

Unable to open tile 12 as a JPEG file: Premature end of JPEG file

Unable to open tile 13 as a JPEG file: Premature end of JPEG file

Unable to open tile 14 as a JPEG file: Premature end of JPEG file

Unable to open tile 15 as a JPEG file: Premature end of JPEG file

Unable to open tile 16 as a JPEG file: Premature end of JPEG file

Unable to open tile 17 as a JPEG file: Premature end of JPEG file

Unable to open tile 18 as a JPEG file: Premature end of JPEG file

Unable to open tile 19 as a JPEG file: Premature end of JPEG file

Unable to open tile 20 as a JPEG file: Premature end of JPEG file

Unable to open tile 21 as a JPEG file: Premature end of JPEG file

Unable to open tile 22 as a JPEG file: Premature end of JPEG file

Unable to open tile 23 as a JPEG file: Premature end of JPEG file

Unable to open tile 24 as a JPEG file: Premature end of JPEG file

Unable to open tile 25 as a JPEG file: Premature end of JPEG file

Unable to open tile 26 as a JPEG file: Premature end of JPEG file

Unable to open tile 27 as a JPEG file: Premature end of JPEG file

Unable to open tile 28 as a JPEG file: Premature end of JPEG file

Unable to open tile 29 as a JPEG file: Premature end of JPEG file

Unable to open tile 30 as a JPEG file: Premature end of JPEG file

Unable to open tile 31 as a JPEG file: Premature end of JPEG file

Unable to open tile 32 as a JPEG file: Premature end of JPEG file
 Extracting tile 33 out of 144
Unable to open tile 33 as a JPEG file: Premature end of JPEG file

Unable to open tile 34 as a JPEG file: Premature end of JPEG file

Unable to open tile 35 as a JPEG file: Premature end of JPEG file

Unable to open tile 36 as a JPEG file: Premature end of JPEG file

Unable to open tile 37 as a JPEG file: Premature end of JPEG file

Unable to open tile 38 as a JPEG file: Premature end of JPEG file

Unable to open tile 39 as a JPEG file: Premature end of JPEG file

Unable to open tile 40 as a JPEG file: Premature end of JPEG file

Unable to open tile 41 as a JPEG file: Premature end of JPEG file

Unable to open tile 42 as a JPEG file: Premature end of JPEG file

Unable to open tile 43 as a JPEG file: Premature end of JPEG file

Unable to open tile 44 as a JPEG file: Premature end of JPEG file

Unable to open tile 45 as a JPEG file: Premature end of JPEG file

Unable to open tile 46 as a JPEG file: Premature end of JPEG file

Unable to open tile 47 as a JPEG file: Premature end of JPEG file

Unable to open tile 48 as a JPEG file: Premature end of JPEG file

Unable to open tile 49 as a JPEG file: Premature end of JPEG file

Unable to open tile 50 as a JPEG file: Premature end of JPEG file

Unable to open tile 51 as a JPEG file: Premature end of JPEG file

Unable to open tile 52 as a JPEG file: Premature end of JPEG file

Unable to open tile 53 as a JPEG file: Premature end of JPEG file

Unable to open tile 54 as a JPEG file: Premature end of JPEG file

Unable to open tile 55 as a JPEG file: Premature end of JPEG file

Unable to open tile 56 as a JPEG file: Premature end of JPEG file

Unable to open tile 57 as a JPEG file: Premature end of JPEG file

Unable to open tile 58 as a JPEG file: Premature end of JPEG file

Unable to open tile 59 as a JPEG file: Premature end of JPEG file

Unable to open tile 60 as a JPEG file: Premature end of JPEG file

Unable to open tile 61 as a JPEG file: Premature end of JPEG file

Unable to open tile 62 as a JPEG file: Premature end of JPEG file

Unable to open tile 63 as a JPEG file: Premature end of JPEG file

Unable to open tile 64 as a JPEG file: Premature end of JPEG file

Unable to open tile 65 as a JPEG file: Premature end of JPEG file
 Extracting tile 66 out of 144
Unable to open tile 66 as a JPEG file: Premature end of JPEG file

Unable to open tile 67 as a JPEG file: Premature end of JPEG file

Unable to open tile 68 as a JPEG file: Premature end of JPEG file

Unable to open tile 69 as a JPEG file: Premature end of JPEG file

Unable to open tile 70 as a JPEG file: Premature end of JPEG file

Unable to open tile 71 as a JPEG file: Premature end of JPEG file

Unable to open tile 72 as a JPEG file: Premature end of JPEG file

Unable to open tile 73 as a JPEG file: Premature end of JPEG file

Unable to open tile 74 as a JPEG file: Premature end of JPEG file

Unable to open tile 75 as a JPEG file: Premature end of JPEG file

Unable to open tile 76 as a JPEG file: Premature end of JPEG file

Unable to open tile 77 as a JPEG file: Premature end of JPEG file

Unable to open tile 78 as a JPEG file: Premature end of JPEG file

Unable to open tile 79 as a JPEG file: Premature end of JPEG file

Unable to open tile 80 as a JPEG file: Premature end of JPEG file

Unable to open tile 81 as a JPEG file: Premature end of JPEG file

Unable to open tile 82 as a JPEG file: Premature end of JPEG file

Unable to open tile 83 as a JPEG file: Premature end of JPEG file

Unable to open tile 84 as a JPEG file: Premature end of JPEG file

Unable to open tile 85 as a JPEG file: Premature end of JPEG file

Unable to open tile 86 as a JPEG file: Premature end of JPEG file

Unable to open tile 87 as a JPEG file: Premature end of JPEG file

Unable to open tile 88 as a JPEG file: Premature end of JPEG file

Unable to open tile 89 as a JPEG file: Premature end of JPEG file

Unable to open tile 90 as a JPEG file: Premature end of JPEG file

Unable to open tile 91 as a JPEG file: Premature end of JPEG file

Unable to open tile 92 as a JPEG file: Premature end of JPEG file

Unable to open tile 93 as a JPEG file: Premature end of JPEG file

Unable to open tile 94 as a JPEG file: Premature end of JPEG file

Unable to open tile 95 as a JPEG file: Premature end of JPEG file

Unable to open tile 96 as a JPEG file: Premature end of JPEG file

Unable to open tile 97 as a JPEG file: Premature end of JPEG file

Unable to open tile 98 as a JPEG file: Premature end of JPEG file
 Extracting tile 99 out of 144
Unable to open tile 99 as a JPEG file: Premature end of JPEG file

Unable to open tile 100 as a JPEG file: Premature end of JPEG file

Unable to open tile 101 as a JPEG file: Premature end of JPEG file

Unable to open tile 102 as a JPEG file: Premature end of JPEG file

Unable to open tile 103 as a JPEG file: Premature end of JPEG file

Unable to open tile 104 as a JPEG file: Premature end of JPEG file

Unable to open tile 105 as a JPEG file: Premature end of JPEG file

Unable to open tile 106 as a JPEG file: Premature end of JPEG file

Unable to open tile 107 as a JPEG file: Premature end of JPEG file

Unable to open tile 108 as a JPEG file: Premature end of JPEG file

Unable to open tile 109 as a JPEG file: Premature end of JPEG file

Unable to open tile 110 as a JPEG file: Premature end of JPEG file

Unable to open tile 111 as a JPEG file: Premature end of JPEG file

Unable to open tile 112 as a JPEG file: Premature end of JPEG file

Unable to open tile 113 as a JPEG file: Premature end of JPEG file

Unable to open tile 114 as a JPEG file: Premature end of JPEG file

Unable to open tile 115 as a JPEG file: Premature end of JPEG file

Unable to open tile 116 as a JPEG file: Premature end of JPEG file

Unable to open tile 117 as a JPEG file: Premature end of JPEG file

Unable to open tile 118 as a JPEG file: Premature end of JPEG file

Unable to open tile 119 as a JPEG file: Premature end of JPEG file

Unable to open tile 120 as a JPEG file: Premature end of JPEG file

Unable to open tile 121 as a JPEG file: Premature end of JPEG file

Unable to open tile 122 as a JPEG file: Premature end of JPEG file

Unable to open tile 123 as a JPEG file: Premature end of JPEG file

Unable to open tile 124 as a JPEG file: Premature end of JPEG file

Unable to open tile 125 as a JPEG file: Premature end of JPEG file

Unable to open tile 126 as a JPEG file: Premature end of JPEG file

Unable to open tile 127 as a JPEG file: Premature end of JPEG file

Unable to open tile 128 as a JPEG file: Premature end of JPEG file

Unable to open tile 129 as a JPEG file: Premature end of JPEG file

Unable to open tile 130 as a JPEG file: Premature end of JPEG file
 Extracting tile 131 out of 144
Unable to open tile 131 as a JPEG file: Premature end of JPEG file

Unable to open tile 132 as a JPEG file: Premature end of JPEG file

Unable to open tile 133 as a JPEG file: Premature end of JPEG file

Unable to open tile 134 as a JPEG file: Premature end of JPEG file

Unable to open tile 135 as a JPEG file: Premature end of JPEG file

Unable to open tile 136 as a JPEG file: Premature end of JPEG file

Unable to open tile 137 as a JPEG file: Premature end of JPEG file

Unable to open tile 138 as a JPEG file: Premature end of JPEG file

Unable to open tile 139 as a JPEG file: Premature end of JPEG file

Unable to open tile 140 as a JPEG file: Premature end of JPEG file

Unable to open tile 141 as a JPEG file: Premature end of JPEG file

Unable to open tile 142 as a JPEG file: Premature end of JPEG file

Unable to open tile 143 as a JPEG file: Premature end of JPEG file
 Extracting tile 144 out of 144
Compressing the output image

Thx in advacne.
Greetings.

Hello and thanks for getting in touch !
What do you mean by "I only get one image" ? The tool exports a single image, this is the expected behavior.
As to the warnings, they seem to be caused by corrupted tiles in the pff file. Is the image output of pff-extract visually different from what you get with the official zoomify viewer ?

I just released v0.4, with better error handling, and an explicit difference between errors and warnings. The new messages look like that :

WARNING: Tile XXX may be corrupted: Premature end of JPEG file

which is probably less confusing.

There is still the possibility that the tile is corrupted by the way it is created in my own source, so I'll leave this issue open.

Indeed, ZoomifyImageExample3.pff seems to be in a slightly different format that was not handled correctly, hence the tile corruption. This is fixed in v0.6

Hi, sorry for my late reply. I tried out the new version and it works great. I get one high resolution image (11.671x6.321). The thing is if I zoom into that image it is not really the same result as on zoomify, its blurry. Its a virtual microscope image. On the virtual microscope website I can zoom in and have a sharp picture. I think its not possible to achieve that with the tool or is it? Thx!

The result should be exactly the same as what you get with the zoomify viewer. Are you sure you are opening the exact same file with zoomify and pff-extract ? Is your image viewer capable of handling other images of the same dimensions correctly ? Can you provide a screenshot of the blurry and sharp images side by side ?

Also: the latest version of pff-extract has an option to extract the individual tiles in the image :

pff-extract input.pff output.jpg output-directory

This will extract the individual tiles in the output-directory folder. Are the individual tiles blurry too ?

I'm sorry Sir I made a mistake. The images are exactly the same. Sorry again! Thank you for your time and patience, my issue has been solved. Have a great day!