LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 07-05-2004, 01:26 AM   #1
R00ts
Member
 
Registered: Mar 2004
Location: Austin TX, USA
Distribution: Ubuntu 11.10, Fedora 16
Posts: 545

Rep: Reputation: 30
Question Image resizing algorithms


Hi everybody! *echo back: "Hi Dr. Nick!"*

Ahem, I'm currently writing a program *points to sig* and I need to do some image resizing so I can support multiple screen resolutions. I'm using C++ with the SDL API and I want to be able to resize a SDL_Surface object that will always be 1024x768 so it can resized to 1200x1024, 800x600, and possibly even 640x480. The bit-depth is 24bpp, but the program allows lower bpp for users who can't handle that depth. So far my googling efforts have been fruitless for I can't find anything that can help.

Someone did mention to me today on #SDL @ freenode.irc.net that the SDL_gfx library does image resizing, but it is not supported across very many platforms, has poor documentation, and I think it's kinda stupid to require users to download and install an entire library just so I can import one feature from it.

So if any of you can provide me with links or information on where I can find the following, I'd appreciate it greatly

1) Code that takes an SDL_Surface object, resizes it, and returns a new SDL_Object that is the specified height and width.

2) Free (GPL) C/C++ code for image resizing.

3) Algorithms for image resizing.
 
Old 07-05-2004, 12:56 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
1.
and
2.

You are having the api at front of you. SDL_gfx is also a part of most distributions (eg. debian).
Want the source? "apt-get source libsdl-gfx1.2" and check the SDL_rotozoom.c.

Want an other algorithms? "apt-get source imagemagick" and check the magick/resize.c.

Still don't want to use that library as a whole? Well, don't. You are free to go and pick just that code from it for a project under GPL license.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing a loopback image Jehuty Linux - Hardware 5 08-29-2005 10:52 AM
PHP image handling/resizing benrose111488 Programming 1 07-07-2005 02:00 AM
Genetic Algorithms Research Paper firefly2442 Programming 1 12-17-2004 09:01 PM
LRU and aging algorithms testing maniac01 Programming 0 04-25-2004 12:03 PM
Graph Layout Algorithms jacksmash Programming 6 02-10-2004 05:56 AM


All times are GMT -5. The time now is 12:52 AM.

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