l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2004 May 12 11:50

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Success with fltk and SDL_image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Success with fltk and SDL_image



On Tue, May 11, 2004 at 05:11:25PM -0700, Jan W wrote:
> Hi all:
> 
> Just a question:
> 
> Has anyone used SDL_image to do scaling and rotation?  If so, is there anything
> that I could use to do basic image manipulations?  I am looking for code
> examples/basic theories so that I can start off down a (more or less)
> reasonable path...

SDL_image itself doesn't do scaling and rotation.  Just loading. :^)


<snip>
> Now, SDL does the work for me, and just leaves me with a surface... awesome.
> 
> So if anyone has any hints/tips/tricks/caveats on SDL surface manipulation,
> I would love any tidbits that might float my way...  and if anyone is
> interested in seeing my code (yea, I have the coding style of an 8 year old),
> just don't laugh when you do.... (write me off list and I'll send a copy)

Hehe :^)

Look into "setpixel()" and "getpixel()", a coupla chunks of demo code that
are floating around SDL's docs or FAQ...

That'll get you at the raw bits of a surface (regardless of its depth)
and then you can manipulate them all you want.

90-degree rotation is pretty trivial.  When you start doing zoom-in our -out,
it gets trickier, but it really ends up being only as complicated as you make
it (e.g., do you do interpolation, averaging, or just skip pixels?)


Hint: See Tux Paint ;)

  http://www.newbreedsoftware.com/tuxpaint/download/source/

-bill!
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!