paolobenve / myphotoshare

MOVED TO GITLAB! --- A Web 2.0 Photo Gallery Done Right via Static JSON, Dynamic Javascript and a bit of php for sharing
15 stars 0 forks source link

parallel mode does not work with tif images #27

Closed espenaf closed 7 years ago

espenaf commented 7 years ago

I thumbnail_generation_mode=parallel, thumnails of tif images are reported as currupt like this:

2017-07-06T07:40:33.525596   |  |  |  |--[ processing image/video]                 1999104.tif

2017-07-06T07:40:34.983790   |  |  |  |  |--[corrupt image]                           1999104.tif

2017-07-06T07:40:35.091845   |  |  |  |  |--[corrupt image]                           1999104.tif

2017-07-06T07:40:35.203525   |  |  |  |  |--[corrupt image]                           1999104.tif

2017-07-06T07:40:35.317236   |  |  |  |  |--[corrupt image]                           1999104.tif

2017-07-06T07:40:35.454228   |  |  |  |  |--[corrupt image]                           1999104.tif

Switching back to cascade makes thumbnail generation work as normal.

joachimtingvold commented 7 years ago

"parallel" mode needs some love in general. It was something I wrote/did years ago, and isn't really that efficient in it's current state. My plan is to rewrite it completely, so that "mixed" can actually "prosper" (do N parallel threads, where N is "number of cores minus one", add all images for an album into the queue, and for each thread do cascade thumbnailing of all thumbnails for that particular image -- or something along those lines).

Why the corruptness, I don't know, but "cascade" is the fastest mode of all three of the modes, afaik, so just stick with "cascade" for now, unless you want to give it a go on fixing "parallel" mode (-:

paolobenve commented 7 years ago

see https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support : very few browsers supports tiff. A note says:

Although it was one of the first suggested WWW image formats, most browsers support TIFF by using a plugin installed by the user instead of decoding it natively.

joachimtingvold commented 7 years ago

very few browsers supports tiff

Not really relevant here, though. We could still make "thumbnails" (the actual images used when browsing the album), which would all be JPEG. The bad support for TIFF would only affect the "original" link for each image; if the browser doesn't support viewing TIFF, you can still download the file and open it in whatever application you want.

paolobenve commented 7 years ago

anyway, it seems that the problem with tiff is in the browsers, closing

joachimtingvold commented 7 years ago

Not really, the problem is with the thumbing (that, or the TIF-file @espenaf had is actually "corrupt").