You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agree, use css to control the image size should be better
shenlebantongying
changed the title
Original GD's bug: Every image is read twice (at least for DSL)
Original GD's problem: Every image is read twice (at least for DSL)
Oct 7, 2023
DSL::nodeToHtml loads the image and then checks the image's size https://github.com/goldendict/goldendict/blob/1.5.0/dsl.cc#L915-L1003
DslResourceRequest::run sends the data to the browser https://github.com/goldendict/goldendict/blob/1.5.0/dsl.cc#L1912-L1955
Try this dict with single image test_dsl.zip
Set a breakpoint at File::loadFromFile, and you can see 2 calls reaches it.
Better solution: replace the size checking with CSS's image max-width.
The text was updated successfully, but these errors were encountered: