Closed GoogleCodeExporter closed 9 years ago
My opinion is that it's probably just better to copy by 4*wpld, and eat the one
extra machine cycle.
Original comment by autoph...@gmail.com
on 23 Jun 2009 at 10:16
Nice catch!
Both your diagnosis of the problem and solution are correct.
I wasn't really trying to save a machine cycle ;-)
This will be fixed in 1.62, which should be out within 2 weeks.
Thanks for reporting the problem and giving the fix.
-- Dan
Original comment by dan.bloo...@gmail.com
on 23 Jun 2009 at 11:02
:) A similar bug can be found in pixExpandReplicate. By the way, where are your
regression test cases? I have
found these bugs by writing my own :)
Original comment by autoph...@gmail.com
on 23 Jun 2009 at 11:03
Correct again. Thanks. Fixed for 1.62.
This was tested with:
pixs = pixRead("speckle.png"); // your small image
pixt1 = pixConvert1To2(NULL, pixs, 3, 0);
pixd = pixExpandReplicate(pixt1, 2);
pixWrite("junkpixd.png", pixd, IFF_PNG); // look at it
pixDestroy(&pixd);
pixDestroy(&pixt1);
pixDestroy(&pixs);
There are regression tests in the prog directory, but as you can imagine, they
don't
cover every possible case. I am continually adding to the set of regression
tests,
both for new functions and for existing functions that may not have been
rigorously
tested. Check out the *_reg.c files in prog.
Original comment by dan.bloo...@gmail.com
on 23 Jun 2009 at 11:36
Fixed in 1.62. Regression test added for this and similar scaling.
Original comment by dan.bloo...@gmail.com
on 26 Jun 2009 at 3:12
Original issue reported on code.google.com by
autoph...@gmail.com
on 23 Jun 2009 at 10:11Attachments: