From: Kartik Thakore The following types are supported: TrueVision Targa (MUST have .tga) Windows Bitmap(.bmp) Portable Anymap (.pnm)
+.pbm = Portable BitMap (mono)
+.pgm = Portable GreyMap (256 greys)
+.ppm = Portable PixMap (full color) X11 Pixmap (.xpm) can be #included directly in code
+This is NOT the same as XBM(X11 Bitmap) format, which is for monocolor images. GIMP native (.xcf) (XCF = eXperimental Computing Facility?)
+This format is always changing, and since there's no library supplied by the GIMP project to load XCF, the loader may frequently fail to load much of any image from an XCF file. It's better to load this in GIMP and convert to a better supported image format. ZSoft IBM PC Paintbrush (.pcx) CompuServe Graphics Interchange Format (.gif) Joint Photographic Experts Group JFIF format (.jpg or .jpeg) Tagged Image File Format (.tif or .tiff) Interleaved Bitmap (.lbm or .iff) FORM : ILBM or PBM(packed bitmap)
+HAM6, HAM8, and 24bit types are not supported. Portable Network Graphics (.png) $file Image file name to load a surface from. Load file for use as an image in a new SDL::Surface. This actually calls
@@ -42,48 +43,57 @@
-
IMG_LoadTyped_RW
the binded function to SDL::Image::load_typed_rw, with the file extension used as the type string. This can load all supported image files, including TGA as long as the filename ends with ".tga". It is best to call this outside of event loops, and rather keep the loaded images around until you are really done with them, as disk speed and image conversion to a surface is not that speedy.
-Note: If the image format loader requires initialization, it will attempt to do that the first time it is needed if you have not already called IMG_Init to load support for your image format.
-Note: If the image format supports a transparent pixel, SDL_image will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling:
-SDL::Video::set_color_key($image, SDL_RLEACCEL, $image->format->colorkey);
my $image = SDL::Image::load( $some_png_file ); + SDL::Video::set_color_key($image, SDL_RLEACCEL, $image->format->colorkey); +
bitwise OR'd set of image formats to support by loading a library now. The values you may OR together to pass in are:
Initialize by loading support as indicated by the flags, or at least return success if support is already loaded. You may call this multiple times, which will actually require you to call IMG_Quit just once to clean up. You may call this function with a 0 to retrieve whether support was built-in or not loaded yet. Note: to load JPG, PNG, and/or TIF images you can call IMG_Init with the right IMG_INIT_* flags OR'd together before you program gets busy, to prevent a later hiccup while it loads the library, and to check that you do have the support that you need before you try and use it. @@ -182,9 +189,6 @@ Note: this function does not always set the error string, so do not depend on SD my $flags = IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_JPG; my $inited = SDL::Image::init($flags); - - -
Core | ||
SDL | - Simple DirectMedia Layer for Perl |
Audio | ||
SDL::Audio | - SDL Bindings for Audio |
Structure | ||
SDL::AudioCVT | - Audio Conversion Structure | |
SDL::AudioSpec | - SDL Bindings for structure SDL::AudioSpec |
CDROM | ||
SDL::CDROM | - SDL Bindings for the CDROM device |
Structure | ||
SDL::CD | - SDL Bindings for structure SDL_CD | |
SDL::CDTrack | - SDL Bindings for structure SDL_CDTrack |
Events | ||
SDL::Events | - Bindings to the Events Category in SDL API |
Structure | ||
SDL::Event | - General event structure |
Joystick | ||
SDL::Joystick | - SDL Bindings for the Joystick device |
Structure | ||
SDL::Mixer::MixChunk | - SDL Bindings for structure SDL_MixChunk | |
SDL::Mixer::MixMusic | - SDL Bindings for structure SDL_MixMusic |
Mouse | ||
SDL::Mouse | - SDL Bindings for the Mouse device |
Structure | ||
SDL::Cursor | - Mouse cursor structure |
Structure | ||
SDL::Version | - SDL Bindings for structure SDL_Version |
Video | ||
SDL::Video | - Bindings to the video category in SDL API |
Structure | ||
SDL::Color | - Format independent color description | |
SDL::Overlay | - YUV Video overlay | |
SDL::Palette | - Color palette for 8-bit pixel formats | |
SDL::PixelFormat | - Stores surface format information | |
SDL::Rect | - Defines a rectangular area | |
SDL::Surface | - Graphic surface structure. | |
SDL::VideoInfo | - Video Target Information |
Cookbook | ||
SDL::Cookbook | ||
SDL::Cookbook::PDL |
Extension | ||
SDL::App | - a SDL perl extension |
Mixer | ||
SDL::Mixer | - a SDL perl extension |
TODO |
Core |
MultiThread | ||
SDL::MultiThread | - Bindings to the MultiThread category in SDL API |
Structure | ||
SDL::RWOps | - SDL Bindings to SDL_RWOPs |
Image | ||
SDL::Image | - Bindings for the SDL_Image library |
Tutorials | ||
SDL::Tutorial | - introduction to Perl SDL | |
SDL::Tutorial::Animation | ||
SDL::Tutorial::Images | ||
SDL::Tutorial::LunarLander | - a small tutorial on Perl SDL | |
SDL::Tutorial::Pong | - Get started pong | |
SDL::Tutorial::Tetris | - Let's Make Tetris |
UNCATEGORIZED | ||
SDL::Font | - a SDL perl extension | |
SDL::Game::Palette | - a perl extension | |
SDL::MPEG | - a SDL perl extension | |
SDL::Music | - a perl extension | |
SDL::OpenGL | - a perl extension | |
SDL::SFont | - a perl extension | |
SDL::SMPEG | - a SDL perl extension | |
SDL::Sound | - a perl extension | |
SDL::TTFont | - a SDL perl extension | |
SDL::Timer | - a SDL perl extension for managing timers. | |
SDL::Tool::Font | - a perl extension | |
SDL::Tool::Graphic | ||
SDL::old-cdrom | - a SDL perl extension for managing CD-ROM drives |
Core | ||
SDL | - Simple DirectMedia Layer for Perl |
Audio | ||
SDL::Audio | - SDL Bindings for Audio |
Structure | ||
SDL::AudioCVT | - Audio Conversion Structure | |
SDL::AudioSpec | - SDL Bindings for structure SDL::AudioSpec |
CDROM | ||
SDL::CDROM | - SDL Bindings for the CDROM device |
Structure | ||
SDL::CD | - SDL Bindings for structure SDL_CD | |
SDL::CDTrack | - SDL Bindings for structure SDL_CDTrack |
Events | ||
SDL::Events | - Bindings to the Events Category in SDL API |
Structure | ||
SDL::Event | - General event structure |
Joystick | ||
SDL::Joystick | - SDL Bindings for the Joystick device |
Structure | ||
SDL::Mixer::MixChunk | - SDL Bindings for structure SDL_MixChunk | |
SDL::Mixer::MixMusic | - SDL Bindings for structure SDL_MixMusic |
Mouse | ||
SDL::Mouse | - SDL Bindings for the Mouse device |
Structure | ||
SDL::Cursor | - Mouse cursor structure |
Structure | ||
SDL::Version | - SDL Bindings for structure SDL_Version |
Video | ||
SDL::Video | - Bindings to the video category in SDL API |
Structure | ||
SDL::Color | - Format independent color description | |
SDL::Overlay | - YUV Video overlay | |
SDL::Palette | - Color palette for 8-bit pixel formats | |
SDL::PixelFormat | - Stores surface format information | |
SDL::Rect | - Defines a rectangular area | |
SDL::Surface | - Graphic surface structure. | |
SDL::VideoInfo | - Video Target Information |
Cookbook | ||
SDL::Cookbook | ||
SDL::Cookbook::PDL |
Extension | ||
SDL::App | - a SDL perl extension |
Mixer | ||
SDL::Mixer | - a SDL perl extension |
TODO |
Core |
MultiThread | ||
SDL::MultiThread | - Bindings to the MultiThread category in SDL API |
Structure | ||
SDL::RWOps | - SDL Bindings to SDL_RWOPs |
Image | ||
SDL::Image | - Bindings for the SDL_Image library |
Tutorials | ||
SDL::Tutorial | - introduction to Perl SDL | |
SDL::Tutorial::Animation | ||
SDL::Tutorial::Images | ||
SDL::Tutorial::LunarLander | - a small tutorial on Perl SDL | |
SDL::Tutorial::Pong | - Get started pong | |
SDL::Tutorial::Tetris | - Let's Make Tetris |
UNCATEGORIZED | ||
SDL::Font | - a SDL perl extension | |
SDL::Game::Palette | - a perl extension | |
SDL::MPEG | - a SDL perl extension | |
SDL::Music | - a perl extension | |
SDL::OpenGL | - a perl extension | |
SDL::SFont | - a perl extension | |
SDL::SMPEG | - a SDL perl extension | |
SDL::Sound | - a perl extension | |
SDL::TTFont | - a SDL perl extension | |
SDL::Timer | - a SDL perl extension for managing timers. | |
SDL::Tool::Font | - a perl extension | |
SDL::Tool::Graphic | ||
SDL::old-cdrom | - a SDL perl extension for managing CD-ROM drives |