Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> About the thumbnails

 
post Nov 21 2024, 23:31
Post #1
reviata



Newcomer
****
Group: Members
Posts: 358
Joined: 19-January 12
Level 500 (Ponyslayer)


In my gallery:
https://e-hentai.org/g/3131122/f850a8bad2/

What I actually upload:
Attached Image

What have I seen in the gallery:
Attached Image

What have I seen in the viewer:
Attached Image

It seems like the offset metadata has been read when producing the thumbnails.
Is this result expected, or is it a mistake?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 22 2024, 00:19
Post #2
Tenboro

Admin




QUOTE(reviata @ Nov 21 2024, 22:31) *

It seems like the offset metadata has been read when producing the thumbnails.
Is this result expected, or is it a mistake?


Hmm yeah, it doesn't like that 1280x720 canvas with the +1044+527 offset. I'll push a fix for it tomorrow.

Edit: This should be fixed now, let me know if you notice any others like that.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 22 2024, 08:32
Post #3
aklfhl



Casual Poster
***
Group: Members
Posts: 191
Joined: 8-February 14
Level 332 (Godslayer)


QUOTE(Tenboro @ Nov 22 2024, 06:19) *

Hmm yeah, it doesn't like that 1280x720 canvas with the +1044+527 offset. I'll push a fix for it tomorrow.

Edit: This should be fixed now, let me know if you notice any others like that.

Thumbnails and resamples are not transparent since page 106, is that expected?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 22 2024, 08:47
Post #4
Tenboro

Admin




QUOTE(aklfhl @ Nov 22 2024, 07:32) *
Thumbnails and resamples are not transparent since page 106, is that expected?


Sort of, though it shouldn't happen anymore. It was caused by a workaround for an old bug in the image library affecting PNG -> JPG conversions when the PNG had both transparency and an offset canvas, but this obviously isn't needed anymore since WebP properly supports transparency.

I'll look into reprocessing that gallery, just need to make some minor tweaks to the processing script first.

Edit: The thumbnails should be regenerated now, let me know if you notice any more issues with these files. (You may need to force a refresh if you viewed it recently.)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 22 2024, 23:16
Post #5
reviata



Newcomer
****
Group: Members
Posts: 358
Joined: 19-January 12
Level 500 (Ponyslayer)


I have also found the same problem in these galleries:
https://e-hentai.org/g/3102309/b7dadc0e37/ (since page 445)
https://e-hentai.org/g/3092125/11ec50b109/ (since page 1519)

I hope this will be fixed soon.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 23 2024, 02:59
Post #6
Necromusume



(((Shark)))
*********
Group: Catgirl Camarilla
Posts: 6,788
Joined: 17-May 12
Level 500 (Ponyslayer)


Newly uploaded gallery with glitchy thumbnails:
https://e-hentai.org/g/3132542/d8de084b35/

Looks like it doesn't handle rotated images correctly.

Also the framing for the resample images doesn't take into account the rotation:
https://e-hentai.org/s/1a54b23194/3132542-4

The resample image looks fine, it displays as 2208 x 1244 on its own, but the framing page is set up for 1244 x 2208.

This post has been edited by Necromusume: Nov 23 2024, 03:03
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 23 2024, 09:27
Post #7
Tenboro

Admin




QUOTE(reviata @ Nov 22 2024, 22:16) *
I have also found the same problem in these galleries:
https://e-hentai.org/g/3102309/b7dadc0e37/ (since page 445)
https://e-hentai.org/g/3092125/11ec50b109/ (since page 1519)


I regenerated the thumbs for those galleries, they look fine to me now but let me know if you notice anything else.

QUOTE(Necromusume @ Nov 23 2024, 01:59) *
Newly uploaded gallery with glitchy thumbnails:
https://e-hentai.org/g/3132542/d8de084b35/

Looks like it doesn't handle rotated images correctly.

Also the framing for the resample images doesn't take into account the rotation:
https://e-hentai.org/s/1a54b23194/3132542-4

The resample image looks fine, it displays as 2208 x 1244 on its own, but the framing page is set up for 1244 x 2208.


The resample backend seems to handle the EXIF rotation correctly - this wasn't supported at all with the old system, but should be fixed with the new uploaders. Looks like it doesn't flip the dimensions around for the CSS width/height though when it's rotated 90 or 270 degrees, so I'll check on that.

Edit: It should correct the dimensions for EXIF-rotated images on new uploads now, but correcting existing images is a little bit tricky. The v2 conversion actually checks for rotation, but it's only covered a small percentage of the image set so far. I'll look into correcting it as the legacy images are converted.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 23 2024, 14:18
Post #8
aklfhl



Casual Poster
***
Group: Members
Posts: 191
Joined: 8-February 14
Level 332 (Godslayer)


QUOTE(Tenboro @ Nov 23 2024, 15:27) *

I regenerated the thumbs for those galleries, they look fine to me now but let me know if you notice anything else.
The resample backend seems to handle the EXIF rotation correctly - this wasn't supported at all with the old system, but should be fixed with the new uploaders. Looks like it doesn't flip the dimensions around for the CSS width/height though when it's rotated 90 or 270 degrees, so I'll check on that.

Edit: It should correct the dimensions for EXIF-rotated images on new uploads now, but correcting existing images is a little bit tricky. The v2 conversion actually checks for rotation, but it's only covered a small percentage of the image set so far. I'll look into correcting it as the legacy images are converted.

Speaking of EXIF rotation, is the resample threshold applied to the dimensions before rotation, while the actual width of the resampled image is calculated based on the dimensions after rotation?
It seems that image was not resampled to 1280x because it's 1244 pixels wide before rotation; but for the 800x resample, that image was resampled to 800 pixels wide after rotation.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 23 2024, 20:23
Post #9
Tenboro

Admin




QUOTE(aklfhl @ Nov 23 2024, 13:18) *
Speaking of EXIF rotation, is the resample threshold applied to the dimensions before rotation, while the actual width of the resampled image is calculated based on the dimensions after rotation?
It seems that image was not resampled to 1280x because it's 1244 pixels wide before rotation; but for the 800x resample, that image was resampled to 800 pixels wide after rotation.


The image library provides the pre-rotation width and height, which is the fundamental problem. This is corrected for new uploads, but needs to be retroactively fixed on legacy ones.

The resample thing is one of the things that makes it tricky, since it can't "just" bandaid the width/height used in the DOM, it has to correct the "native" width and height of the image to avoid a bunch of internal complexity. Which requires changing the fileid, something the system wasn't really designed to do. Though it is possible, and somewhat less tricky for v2 images than for v1 ones.

So far the conversion process has flagged 1552 images that use 90 or 270 degree EXIF rotation, which obviously can't be changed manually, so I need to write a script for it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 25 2024, 21:16
Post #10
Necromusume



(((Shark)))
*********
Group: Catgirl Camarilla
Posts: 6,788
Joined: 17-May 12
Level 500 (Ponyslayer)


QUOTE(Tenboro @ Nov 23 2024, 07:27) *
Edit: It should correct the dimensions for EXIF-rotated images on new uploads now

This one's still doing it (p94, p106, p108, etc). For those images, Exiftool says "Orientation: Rotate 270 CW"

Okada Yui - Asuka
https://e-hentai.org/g/3135162/0c970e8ebb/
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 25 2024, 21:26
Post #11
Tenboro

Admin




QUOTE(Necromusume @ Nov 25 2024, 20:16) *
This one's still doing it (p94, p106, p108, etc). For those images, Exiftool says "Orientation: Rotate 270 CW"

Okada Yui - Asuka
https://e-hentai.org/g/3135162/0c970e8ebb/


So those aren't actually new uploads, the files were already in the system. Though it looks like they were just uploaded but never published - possibly because of the rotation thing.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 26 2024, 08:14
Post #12
-Lumina-



Newcomer
**
Group: Gold Star Club
Posts: 99
Joined: 7-July 19
Level 360 (Dovahkiin)


I'm having an issue where colors from the previous thumbnail bleeds into the next thumbnail, as seen here
(IMG:[files.catbox.moe] https://files.catbox.moe/cjphgw.png)

This happens on both Firefox on my desktop and Chrome on my phone. I've seen it happen to these galleries so far:
https://e-hentai.org/g/3136178/112e5facd6/
https://e-hentai.org/g/3134722/0e40a3ec6e/
https://e-hentai.org/g/3136043/b76a9dc7b9/ (no color bleed but you can see the hair on the third page which shouldn't be there) EDIT: ah on desktop it only happens when I'm zoomed out to 67%, but it's fine at 100%, and it doesn't happen on my phone. The bleed still happens with the other galleries though regardless of zoom.

The actual pages are fine though, so it's just the thumbnails.

This post has been edited by -Lumina-: Nov 26 2024, 08:22
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Nov 26 2024, 14:35
Post #13
Tenboro

Admin




QUOTE(-Lumina- @ Nov 26 2024, 07:14) *
I'm having an issue where colors from the previous thumbnail bleeds into the next thumbnail, as seen here
The actual pages are fine though, so it's just the thumbnails.


Can't really see any offset issues on my end, even zoomed. There could be some slight color bleed on solid-colored pages due to how the thumbs are tiled, but that's to be expected.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 26 2024, 20:18
Post #14
Tenboro

Admin




So I wrote the script to correct the remaining orientation issues on old EXIF-rotated images, and ran it on the two galleries that were posted here previously. They now look fine to me, but let me know if you can spot any other issues with them.

https://e-hentai.org/g/3132542/d8de084b35/
https://e-hentai.org/g/3135162/0c970e8ebb/
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 26 2024, 23:38
Post #15
Necromusume



(((Shark)))
*********
Group: Catgirl Camarilla
Posts: 6,788
Joined: 17-May 12
Level 500 (Ponyslayer)


Thanks. Looks OK to me.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 27 2024, 15:38
Post #16
Tenboro

Admin




Great. I've gone ahead and run the correction on all affected images in galleries that have been converted to v2, and it's also been integrated with the conversion script, so it should correct older images as they are converted.

They should match the orientation of the originals anyway, so that assumes those are correctly oriented. I noticed a handful of cases where they weren't, but I guess that's to be expected. But let me know if you notice any v2 galleries where the orientation of the resamples or thumbs do not match the originals.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 7th April 2025 - 09:50