[visionegg] Re: mysterious image borders

Thanks, that's very helpful.  Will your suggestions!

Can you give me an example of "simply pass a PIL Image instance of a .gif or
other
palletized instance"

Right now, I load graphics using the stim.parameters.texture attribute and
it seems to only work with images already converted to RGB.


On Tue, Nov 3, 2009 at 1:28 PM, Andrew Straw <astraw@xxxxxxxxxxx> wrote:

> Gary Lupyan wrote:
> > Hey all.  I have this odd problem w/ image artifacts.  For some image
> > file-monitor combinations a row of black pixels appears along one or
> > several of the image edges. This makes it impossible to have the image
> > appear seamlessly on a background (that is, when the background of the
> > image and the background of the screen is matched, the row of pixels
> > showing up screws up the seamless presentation of the image on the
> > background.
> >
> > Image format (bmp, png) doesn't matter.  Image placement on the screen
> > doesn't matter (the artifacts still appear).
> > Image size DOES matter.  Slight changes in size can make the borders
> > go away, but it's a trial and error procedure.
> Hi Gary,
>
> This is mostly likely a graphics card dependent scaling issue. The best
> thing to do will be to attempt to get rid of all graphics-card scaling
> -- set your image sizes to powers of 2 (e.g. 1024 by 512 pixel images).
> Other than that, if you can send some sample code that demonstrates the
> issue, I can attempt to take a look at it.
>
> Also, try playing with the texture_mag_filter, texture_min_filter,
> texture_wrap_s, and texture_wrap_t parameters of the TextureStimulus class.
> >
> >
> > Couple other questions:
> > 1. is there a way to display palettized images using texture stimulus?
> Yes, I think if you simply pass a PIL Image instance of a .gif or other
> palletized instance, the VE should automatically convert it to RGB. Or
> are you suggesting pass the acutal palletized data to the graphics card
> and have it do the color lookup? There's no support for that.
> > 2. Is there a way to resize images using texture stimulus? (I know
> > there are other ways of resizing)
> Yes. Simply change the "size" parameter of the TextureStimulus. This
> will change the display size without changing the internal storage,
> which is determined by the texel data out of which the Texture was created.
>
> -Andrew
>
> --
> Andrew D. Straw, Ph.D.
> California Institute of Technology
> http://www.its.caltech.edu/~astraw/<http://www.its.caltech.edu/%7Eastraw/>
>
> ======================================
> The Vision Egg mailing list
> Archives: http://www.freelists.org/archives/visionegg
> Website: http://www.visionegg.org/mailinglist.html
>

Other related posts: