"Free image transformation"

Hi!

Well, I’m looking for a SDL lib. that help me to realize a Free
Transformation of a image (like Flash “Free Transformation” function). I
found several libs that can “resize”, “rotate” SDL_surfaces but no ones are
able to do a free transformation giving 4 points or something similar.

I made an example, You can see the example here
http://img468.imageshack.us/img468/997/example6ml.png

I’m searching for something like “Anti-Grain Geometry” lib, but with no
vectorial images.

Someone know a lib that can realize this function?

Thank you for waste your time reading this post!!!

  • Xesc -

xEsk PiV escreveu:

I’m searching for something like “Anti-Grain Geometry” lib, but with
no vectorial images.

AGG can do a lot more than drawing vector graphics, including
transforming bitmaps. See the examples “image_transforms”,
“image_perspective” and “distortions”:
http://www.antigrain.com/demo/index.html

But be aware that AGG is not itself a library, it’s a framework to build
libraries. You build your own drawing pipeline with AGG “blocks”
(optionally adding your own handmade “blocks” in any place you want),
creating your own API. So you’ll have to spend some time reading the
examples (at least the ones that are relevant to you) to learn how to
use it.

Or, if you just want some simple distortions with hardware acceleration,
use OpenGL; it’s much easier.—
Daniel K. O.

Try to use the SGE lib
http://www.etek.chalmers.se/~e8cal1/sge/index.html

maybe this funktion can help you

*void sge_TexturedRect(SDL_Surface *dest, Sint16 x1, Sint16 y1, Sint16 x2,
Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, SDL_Surface source,
Sint16 sx1, Sint16 sy1, Sint16 sx2, Sint16 sy2, Sint16 sx3, Sint16 sy3,
Sint16 sx4, Sint16 sy4)

Draws a texture mapped rectangle (p1,p2,p3,p4) on dest with the texture from
the rectangle (sp1,sp2,sp3,sp4) on src.

2006/6/26, Daniel K. O. <danielko.listas at gmail.com>:>

xEsk PiV escreveu:

I’m searching for something like “Anti-Grain Geometry” lib, but with
no vectorial images.

AGG can do a lot more than drawing vector graphics, including
transforming bitmaps. See the examples “image_transforms”,
“image_perspective” and “distortions”:
http://www.antigrain.com/demo/index.html

But be aware that AGG is not itself a library, it’s a framework to build
libraries. You build your own drawing pipeline with AGG “blocks”
(optionally adding your own handmade “blocks” in any place you want),
creating your own API. So you’ll have to spend some time reading the
examples (at least the ones that are relevant to you) to learn how to
use it.

Or, if you just want some simple distortions with hardware acceleration,
use OpenGL; it’s much easier.


Daniel K. O.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Thanks for these answers! :smiley:
First I’ll test the SGE lib, and in a near future i’ll read also the
examples of AGG freamwork.

  • Xesc -