Re: [Digilib-devel] last row filled with black pixels
A versatile image viewing environment for the internet
Brought to you by:
robcast
|
From: Robert C. <ca...@mp...> - 2014-04-29 07:51:11
|
Hi Mathias, On 28.04.14 11:36, Mathias Göbel wrote: > Thank you very much for your reply. > My current version is2.2.2 > (/META-INF/maven/digilib/digilib-webapp/pom.xml). The fix for (at least somewhat) improved precision got in later than the 2.2.2 release. I would suggest to try one of the daily builds of the 2.3-SNAPSHOT line if you can: http://it-dev.mpiwg-berlin.mpg.de/downloads/digilib/daily-build/ I could try to create an updated 2.2.3 with only that fix if there is sufficient interest in that. Personally I would prefer to release a 2.3.0 with the current code in the near future. I you have any problems just ask. Cheers Robert > I see this issue is not exclusive to my server configuration. But I am > not able to fix this code at the moment - I am not a computer scientist > and there is the well known lack of time. > > I definitely prefer transparent pixels - the parameter &mo=png did the > trick for now, but i will update asap. > I may set up a post-processing instruction, that prove the rendered > image size in comparison to the expected value. A CSS instruction can > refine the image by placing it in a container with the correct size. > One can do it with JS and/or JS libraries like pixastic > <http://www.pixastic.com/lib/> as well. Digital editions are rather > static and after the publication cached images can help to remove the > libraries overhead. > > Best, > Mathias > > > > On 24.04.2014 15:46, Robert Casties wrote: >> Hi Mathias, >> >> On 24.04.14 12:55, Mathias Göbel wrote: >>> I use the digilib scaler to extract parts of larger images and >>> include them in a >>> digital edition. I recently observed an reproducible issue. Some >>> images returned >>> by the scaler come with a (last) row and (last) column filled with >>> black pixels. >>> You can see an example here: >>> >>> >>http://141.5.101.102/digilib/Scaler?&fn=C07_062.jpg&dw=500&dh=500&wx=0.49559520812353136&wy=0.16589224303043199&ww=0.3766523581738838&wh=0.3066492977229197 >>> >>> >>> >>> I wonder why the resulting images width is 501px, but dw is set to 500. >>> If I change the dh/dw parameters, the results comes - as expected - >>> without the >>> black lines. >>> http://141.5.101.102/digilib/Scaler?&fn=C07_062.jpg&dw=1500&dh=1500&wx=0.49559520812353136&wy=0.16589224303043199&ww=0.3766523581738838&wh=0.3066492977229197 >>> >>> But the result is still one pixel larger than the parameter defines. >> digilib has some rounding issues especially with high zoom factors which >> lead to wrong calculations of the resulting image size. Depending on the >> image format additional pixels are either black (from JPG) or >> transparent (PNG from TIFF). >> >> Which version of digilib are you using? The precision of calculations >> was improved in October 2013 (Scaler version 2.2.3 >> <http://sourceforge.net/p/digilib/code/ci/21441a3f52085048378806b8c0eeff21e0bd3a64/>) >> >> but there are still issues with big zoom factors. >> >> The current code that calculates sizes (getScaleXY and related in >> http://sourceforge.net/p/digilib/code/ci/tip/tree/common/src/main/java/digilib/image/ImageJobDescription.java) >> >> has rather complicated side-effects and I haven't found the core of the >> rounding problem yet. (patches are welcome :-) >> >> Best >> Robert >> |