[SDL] SDL 1.3 image scaling

Ken Rogoway Ken at HomebrewSoftware.com
Wed Dec 22 16:38:44 PST 2010


Ed,

 

I've been using SDL 1.3 and have had no problem scaling images.  The only
thing I do is call RenderCopy with the size I want it scaled to in the DEST
Rect.

 

What format is your image in?  16 bit, 24, 32?  Do you have a sample to show
the problem?

 

From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Alex Barry
Sent: Wednesday, December 22, 2010 6:06 PM
To: SDL Development List
Subject: Re: [SDL] SDL 1.3 image scaling

 

Also, if it's an image you have outside the program (like a png or bmp), and
you know you'll have to scale it, you could just scale it outside the
program with GIMP, if all else fails.  If it's being scaled on a
per-computer basis, then you might want to look into what other modes are
supported (you might have to grab the latest repository version?).

Take care,
-Alex

On Wed, Dec 22, 2010 at 2:42 PM, Mason Wheeler <masonwheeler at yahoo.com>
wrote:

Actually, nevermind.  I was reading the code wrong.  It looks like these
different modes are supported.  Maybe they just don't do all that much under
D3D.  Try using the GL renderer and see if it looks any better.

 

  _____  

From: Mason Wheeler <masonwheeler at yahoo.com>
Subject: Re: [SDL] SDL 1.3 image scaling

 

Well that's odd..  It looks like the code in D3D_RenderCopy actually
supports different scale modes, but D3D_SetTextureScaleMode doesn't actually
support *setting* the mode!  You ought to write up a patch for it.

 

  _____  

From: ebyard <e_byard at yahoo.co.uk>
Subject: [SDL] SDL 1.3 image scaling

Hi Folks

I'm scaling an image from 1024x768 to 1280x1024, and the result looks like a
car crash. It's all pixellated and horrible, whereas if I scale it in
Fireworks/GIMP etc it looks OK.

I see a comment that "SDL_TEXTURESCALEMODE_FAST is the only type supported
at this time" and the SDL source seems to confirm it. 

Is there any way to get it better? I am using DirectX - what about GDI or
something??

Any help much appreciated!

Thanks
Ed


_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20101222/8f666ccc/attachment-0008.htm>


More information about the SDL mailing list