Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-25-2010, 11:44 PM   #1
puneeth bhat
Registered: Jan 2010
Posts: 30

Rep: Reputation: 15
Cool image rescaling using sdl

how can i do image rescaling in sdl.....i m receiving the RGB image of 640*480,i have to change it to 352*288 while displaying in there any direct api to change it.
Old 03-26-2010, 04:56 PM   #2
Senior Member
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Try to implement something like: (Where picture is a linear array of pixels, and putpixel plots pixels).
int x,y;
for(x=0;x < 640;x++){
      for(y=0;y < 480;y++){
            putpixel(x * 1.82, y * 1.666, picture[(y * 640) + x]);

Last edited by smeezekitty; 03-26-2010 at 04:57 PM.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
program usring SDL lib run at ARM board, show image speed is very slow. yuechun Linux - Software 0 12-22-2009 06:55 AM
SDL segmentation fault and image corruptions sparker Programming 3 04-01-2008 04:52 PM
Radeon 9250 no rescaling bluesmanu Linux - Hardware 1 03-01-2006 09:48 AM
SDL Image problem.. where do I put... RHLinuxGUY Programming 3 07-23-2005 03:36 AM
sdl .raw image-based map loading elvee Programming 2 10-09-2004 02:03 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration