[Verse-dev] Bug in bitmap node?

Emil Brink emil at obsession.se
Thu Feb 2 13:34:32 CET 2006


Jiří Hnídek wrote:
> Hi,
> I propably found bug in verse bitmap node, but I'm not sure. When I
> received tiles from verse server and width of image wasn't integer
> multiples of the tile side length (8), then I received damaged data from
> tiles on right border.
> 
> You can read this:
> 
> "Any pixels in a tile that fall outside of the bitmap itself will not be
> stored and should transmitted as zeroes when transmission is at all
> required."
> 
> in core specification:
> 
> http://verse.blender.org/cms/fileadmin/verse/spec/n-bitmap.html
> 
> ... when you ignore data outside of the bitmap, then everything is ok.
> When you expect, that you will receive zeros, then you will have
> problems (you will receieve damaged data in tiles on right border of
> image). I noticed this problem only on right side of image
> (x>image->width), not bellow image (y > image->height).

That's weird. But I think the problem is indeed there, and the server
is not conforming to the specification. That's rather silly of it, so
I wrote (and committed) a patch that changes it.

The patch simply sits in vs_node_bitmap.c, the server implemenation of
the bitmap node, and clears any outside pixels in all *incoming* tiles.

It does this before the tile is stored, and thus any subsequent sending
of that tile to a subscriber will send a cleaned version.

I've done some minimal testing and it looks like it's doing the right
thing, but if you feel like taking a look at the code, that'd be
appreciated too of course.

To be specific, I've only tested it with uploaded PNG images, not with
e.g. the GIMP, but from the server's point of view there should be no
difference, where an image comes from shouldn't matter.

Thanks for spotting and reporting this.

Regards,

/Emil


More information about the Verse-dev mailing list