Hi Marcel,

Very sorry for how long it took me to get back to your submission.
The changes look correct, now merged and submitted to svn/trunk.

Thanks for your patience,
Robert.

On 23 May 2012 13:52, Marcel Pursche
<[email protected]> wrote:
> Hello Robert,
>
> I found a bug in the osg::copyImage function when I was trying to write
> a programm to create a very large texture atlas and then save it into
> small tiles (for virtual texturing). The guard clauses at the beginning
> of the copyImage function seem to be buggy.
> I wasn't able to copy a small part of a big image(the atlas) into a
> smaller image (one tile). I got error messages that the input height was
> to big. But it should easily be possible to copy a 256x256 part of the
> atlas into a 256x256 output image. On the other hand I was able to
> accidently trigger a bad memory access when I was trying to copy a small
> image(input texture) into a big one(the atlas), when the destination
> offset was not calculatetd correct. The guarding clauses should have
> prevented this.
> Another small bug is the return value of the function. It is not
> documented but I think it should return false if an error occured and
> true if the image was copied with no problems. But in the last else case
> where the color format needs to be transformed for copying, the return
> value is false although the image is copied.
> To fix this problems I rewrote the guarding clauses and changed the
> return value to true in the last case. I tested the code with a small
> programm that tests several cases with different input and output image
> sizes and also wrong coordinates to trigger the guarding clauses. No
> errors occured.
> I used the latest osg version from the git repository(I wasn't able to
> get a connection to the SVN repository today, the website wasn't working
> on my pc either). The git revision is
> "81bab2d5ba3bdd99f1061ea8e7ce32f10e0359db" . And the last commit was:
> "Author: Robert OSFIELD<[email protected]>  Date:   Mon May 21
> 09:12:13 2012 +0000".
>
> Sincerly
>
> Marcel
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to