Using XVideo extension?

Peter Harris peter.harris at hummingbird.com
Mon Dec 10 08:15:21 PST 2007


Florian Harmuth wrote:
> Sorry that i have to reask again -> actually i get my image informations
> as XImage struct. Is it possible to convert/cast this information to the
> XRenders Picture format?

In order to implement your StretchImage(), the process would look
something like:

 XRenderCreatePicture(window)

 XCreatePixmap()
 XRenderCreatePicture(pixmap)
# If the input size is constant, the above only need to be done once

 XRenderSetPictureTransform(pixmap_picture)
# The above line is only needed when the amount of stretch changes

 XPutImage(pixmap) # XImage struct used here
 XRenderCompositeImage(pixmap_picture, null_mask, window_picture)

# Free pictures and pixmap here, unless cached

Setting a non-default filter to smooth out the scaling is left as an
exercise for the reader.

Peter Harris

-- 
     Hummingbird Connectivity - A Division of Open Text
Peter Harris                    http://connectivity.hummingbird.com
Research and Development        Phone: +1 905 762 6001
peter.harris at hummingbird.com    Toll Free: 1 877 359 4866



More information about the xorg mailing list