SDL_image

VisualC.zip does’nt contain anything in SDL_image-1.1.0.tar.gz. Why is it
so?

VisualC.zip does’nt contain anything in SDL_image-1.1.0.tar.gz. Why is it
so?

Because it wasn’t complete in that release. There will be a complete
VisualC.zip in the 1.1.1 release which should happen fairly soon.

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

I think I just used the web interface to CVS and downloaded a recent version
of that file…–

Olivier A. Dagenais - Software Architect and Developer

“Pontus Marktr?m” <pontus.markstrom at aerotechtelub.se> wrote in message
news:972kkm$nii$1 at ftp.lokigames.com

VisualC.zip does’nt contain anything in SDL_image-1.1.0.tar.gz. Why is it
so?

hi,

i want to use SDL_image for loading images as textures for OpenGL. mainly, no
problem.
but when loading bmp or tga, the red and blue components seem to be swapped,
so i have to set up GL_BGR in OGL.
i wouldn’t see any problem, if all fileformats would behave this way. not jpg
and png. here i have to use GL_RGB.

is it my fault? do i have to convert the image data into something first?
when i display the images with ‘showimage’, no errors, never! little bit
confusing :slight_smile:

my configuration:

  • little endian, linux, xfree 4.1.0
  • SDL v1.2.0
  • SDL_image v1.2.0

thanks,
jan

Hi,
When I try to view jpg file with SDL_image I get this error: "Fatal signal: Segmentation Fault (SDL Parachute Deployed)."
Bmp, tga work fine, but jpeg don’t.
Anyone can help me?
I am using Cygwin with XP OS.

Thanks,
Alcionei Estevam Jr

Hi SDL fans,

Could somebody tell me what a mere man should do if they want to use
SDL_image in Dev-C++? I didn’t manage to discover proper packages.

                            Dynamite Dan, Prague, Czech Republic

Dynamite Dan wrote:

Hi SDL fans,

Could somebody tell me what a mere man should do if they want to use
SDL_image in Dev-C++? I didn’t manage to discover proper packages.

                           Dynamite Dan, Prague, Czech Republic

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

I have a few precompiled libraries for use in Dev-C++. They are found
on the files section of the project fftrader on sourceforge.
http://sourceforge.net/projects/fftrader/ That’s the short answer.

The long answer is to use Msys, which requires you to download the
source packages of every dependency for SDL_image (in other words, SDL)
and compile those, then compile SDL_image. There are complete
instructions somewhere, but I forget where.

-TomT64

I forgot to mention what that big 4MB file includes. It has the
following libraries precompiled (with DLLs too) in it:

SDL 1.2.7
SDL_image 1.2.3 linked against libpng 1.0.15 instead of 1.0.8 (this
fixed a crash problem in Windows NT based systems)
SDL_mixer 1.2.5
SDL_gfx 2.0.10
SDL_ttf 2.0.6
PhysFS 1.0.0

Hi,
You can try the libraries offered in
http://www.bloodshed.net/dev/packages/sdl.html
but I had still problems with them and the links only work
from time to time.

Try instead,
http://www.uam.es/personal_pdi/ciencias/fchamizo/
and click on “Privado”.

Good luck,

P.S. More pages with information about SDL and Dev-C++:
If you read french, you can look at the site
http://prografix.games-creators.org/document/170

or, regarding to a problem with SDL_image:
http://www.gamedev.net/community/forums/topic.asp?topic_id=81461>From: “Dynamite Dan”

Reply-To: sdl at libsdl.org
To: sdl at libsdl.org
Subject: [SDL] SDL_image
Date: Wed, 05 May 2004 10:39:47 +0200

Hi SDL fans,

Could somebody tell me what a mere man should do if they want to use
SDL_image in Dev-C++? I didn’t manage to discover proper packages.

                            Dynamite Dan, Prague, Czech Republic

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


MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus

Thank you, TomT64. It looks useful.

                 Dynamite Dan, Prague, Czech Republic

Hi,

I have a problem with the SDL_image recognition for color keying.
when I load an image saved with irfanview as png with transparency,
no flags are set.
I guess the should be SDL_SRCPIXELCOLOR set, or is there
another way to distinguish between an image which has
transparency set or not set ?

Regards,
Thomas Omilian

#include
#include <stdlib.h>
#include <SDL.H>
#include <SDL_Image.h>

using namespace std;

static const char *file = “c:\image.png”;
SDL_Surface *img;

int main(int argc, char *argv[])
{
if
(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO|SDL_INIT_TIMER|SDL_INIT_CDROM) <
0) {
exit(0);
}
img=IMG_Load(file);

if (img->flags==0) {
cout <<“no flags set”;
} else {
cout << “why did you get this message ?”;
}
if (img!=NULL) {
SDL_FreeSurface(img);
}
SDL_Quit();

return 0;
}

Along with the flags, you should check the images BBP. If it’s 4 bytes,
then your transparency is most likely stored in the alpha channel. I
don’t know much about Irfanview, but most graphics programs I’ve used
save PNGs with a full channel for transparency, since the format
supports it. And when SDL_image opens a PNG with transparency, it
creates an RGBA surface rather than an RGB with color key flags. If
your image is loaded with an alpha channel, then you normally won’t have
to deal with the SDL_SRCPIXELCOLOR flag. You might need to check for
the SDL_SRCALPHA flag though. I can’t remember if SDL_image sets that
flag for transparent PNGs or lets you do it yourself depending on how
you intend to blit it.

Of course, if you know the color that’s supposed to be transparent, you
can also set the flags yourself after loading the image.

Ryan

paccy at t-online.de wrote:>Hi,

I have a problem with the SDL_image recognition for color keying.
when I load an image saved with irfanview as png with transparency,
no flags are set.
I guess the should be SDL_SRCPIXELCOLOR set, or is there
another way to distinguish between an image which has
transparency set or not set ?

Regards,
Thomas Omilian

#include
#include <stdlib.h>
#include <SDL.H>
#include <SDL_Image.h>

using namespace std;

static const char *file = “c:\image.png”;
SDL_Surface *img;

int main(int argc, char *argv[])
{
if
(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO|SDL_INIT_TIMER|SDL_INIT_CDROM) <
0) {
exit(0);
}
img=IMG_Load(file);

if (img->flags==0) {
cout <<“no flags set”;
} else {
cout << “why did you get this message ?”;
}
if (img!=NULL) {
SDL_FreeSurface(img);
}
SDL_Quit();

return 0;
}


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

Hi,

I am using sdl_image to load images into opengl textures. The image shows up
fine in linux, but in windows it simply blanks to white spots.

What can be the possible reason?

-Abhinav

There are many possible reasons. Can you show us the code?On Thu, Sep 18, 2008 at 4:26 PM, Abhinav Lele <abhinav.lele at gmail.com> wrote:

I am using sdl_image to load images into opengl textures. The image shows up
fine in linux, but in windows it simply blanks to white spots.

What can be the possible reason?

I load it using the following function:

http://openanimator.googlepages.com/lua_image.cpp

It is rendered using a lua code:

http://openanimator.googlepages.com/render_code.txt

-AbhinavOn Thu, Sep 18, 2008 at 10:18 PM, Brian <brian.ripoff at gmail.com> wrote:

There are many possible reasons. Can you show us the code?

On Thu, Sep 18, 2008 at 4:26 PM, Abhinav Lele <@Abhinav_Lele> wrote:

I am using sdl_image to load images into opengl textures. The image shows
up
fine in linux, but in windows it simply blanks to white spots.

What can be the possible reason?


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

Stephen King - “French is the language that turns dirt into romance.”

FYI. I see a white box of the same size as the image. Is the image not being
loaded correctly ?On Thu, Sep 18, 2008 at 10:30 PM, Abhinav Lele <@Abhinav_Lele>wrote:

I load it using the following function:

http://openanimator.googlepages.com/lua_image.cpp

It is rendered using a lua code:

http://openanimator.googlepages.com/render_code.txt

-Abhinav

On Thu, Sep 18, 2008 at 10:18 PM, Brian <brian.ripoff at gmail.com> wrote:

There are many possible reasons. Can you show us the code?

On Thu, Sep 18, 2008 at 4:26 PM, Abhinav Lele <@Abhinav_Lele> wrote:

I am using sdl_image to load images into opengl textures. The image
shows up
fine in linux, but in windows it simply blanks to white spots.

What can be the possible reason?


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

Stephen King - “French is the language that turns dirt into romance.”