From: Kartik Thakore Date: Fri, 4 Dec 2009 20:23:49 +0000 (-0500) Subject: ClceanUP X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=37dfe38329879216ebc2fcf3861c4d156f7363dd;p=sdlgit%2FSDL-Site.git ClceanUP --- diff --git a/pages/SDL-Image.html-inc b/pages/SDL-Image.html-inc index 46274ad..f295dd3 100644 --- a/pages/SDL-Image.html-inc +++ b/pages/SDL-Image.html-inc @@ -21,10 +21,11 @@
  • set_error
  • -
  • get_error -
  • +
  • get_error
  • +
  • SEE ALSO +

  • @@ -42,48 +43,57 @@

    The following types are supported:

    -
    * -TGA - TrueVision Targa (MUST have .tga)
    -
    * -BMP - Windows Bitmap(.bmp)
    -
    * -PNM - Portable Anymap (.pnm) - .pbm = Portable BitMap (mono) - .pgm = Portable GreyMap (256 greys) - .ppm = Portable PixMap (full color)
    -
    * -XPM - X11 Pixmap (.xpm) can be #included directly in code - This is NOT the same as XBM(X11 Bitmap) format, which is for monocolor images.
    -
    * -XCF - 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.
    -
    * -PCX - ZSoft IBM PC Paintbrush (.pcx)
    -
    * -GIF - CompuServe Graphics Interchange Format (.gif)
    -
    * -JPG - Joint Photographic Experts Group JFIF format (.jpg or .jpeg)
    -
    * -TIF - Tagged Image File Format (.tif or .tiff)
    -
    * -LBM - Interleaved Bitmap (.lbm or .iff) FORM : ILBM or PBM(packed bitmap) - HAM6, HAM8, and 24bit types are not supported.
    -
    * -PNG - Portable Network Graphics (.png) =item *
    -
    * -XV - ???
    +
    TGA
    +
    +

    TrueVision Targa (MUST have .tga)

    +
    +
    BMP
    +
    +

    Windows Bitmap(.bmp)

    +
    +
    PNM
    +
    +

    Portable Anymap (.pnm) +.pbm = Portable BitMap (mono) +.pgm = Portable GreyMap (256 greys) +.ppm = Portable PixMap (full color)

    +
    +
    XPM
    +
    +

    X11 Pixmap (.xpm) can be #included directly in code +This is NOT the same as XBM(X11 Bitmap) format, which is for monocolor images.

    +
    +
    XCF
    +
    +

    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.

    +
    +
    PCX
    +
    +

    ZSoft IBM PC Paintbrush (.pcx)

    +
    +
    GIF
    +
    +

    CompuServe Graphics Interchange Format (.gif)

    +
    +
    JPG
    +
    +

    Joint Photographic Experts Group JFIF format (.jpg or .jpeg)

    +
    +
    TIF
    +
    +

    Tagged Image File Format (.tif or .tiff)

    +
    +
    LBM
    +
    +

    Interleaved Bitmap (.lbm or .iff) FORM : ILBM or PBM(packed bitmap) +HAM6, HAM8, and 24bit types are not supported.

    +
    +
    PNG
    +
    +

    Portable Network Graphics (.png)

    +
    +
    XV
    @@ -103,13 +113,13 @@ XV

    $file Image file name to load a surface from.

    Load file for use as an image in a new SDL::Surface. This actually calls 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);

    - - - +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 SDL::Image::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

    +
      my $image = SDL::Image::load( $some_png_file );
    +  SDL::Video::set_color_key($image, SDL_RLEACCEL, $image->format->colorkey);
     
    +

    Returns

    @@ -158,12 +168,9 @@ 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:

    -
    * - IMG_INIT_JPG = 0x00000001
    -
    * - IMG_INIT_PNG = 0x00000002
    -
    * - IMG_INIT_TIF = 0x00000004
    +
    IMG_INIT_JPG
    +
    IMG_INIT_PNG
    +
    IMG_INIT_TIF

    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); - - -

    @@ -196,4 +200,9 @@ Note: this function does not always set the error string, so do not depend on SD
    +

    SEE ALSO

    Top

    +
    +

    SDL, SDL::Surface, SDL::Video, SDL::RWOps

    + +
    \ No newline at end of file diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index 93d99cc..e132cff 100644 --- a/pages/documentation.html-inc +++ b/pages/documentation.html-inc @@ -1,2 +1,2 @@
    -

    Documentation (latest development branch)

    Core
    thumbSDL- Simple DirectMedia Layer for Perl
    Audio
    thumbSDL::Audio- SDL Bindings for Audio
    Structure
    thumbSDL::AudioCVT- Audio Conversion Structure
    thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
    CDROM
    thumbSDL::CDROM- SDL Bindings for the CDROM device
    Structure
    thumbSDL::CD- SDL Bindings for structure SDL_CD
    thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
    Events
    thumbSDL::Events- Bindings to the Events Category in SDL API
    Structure
    thumbSDL::Event- General event structure
    Joystick
    thumbSDL::Joystick- SDL Bindings for the Joystick device
    Structure
    thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
    thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic
    Mouse
    thumbSDL::Mouse- SDL Bindings for the Mouse device
    Structure
    thumbSDL::Cursor- Mouse cursor structure
    Structure
    thumbSDL::Version- SDL Bindings for structure SDL_Version
    Video
    thumbSDL::Video- Bindings to the video category in SDL API
    Structure
    thumbSDL::Color- Format independent color description
    thumbSDL::Overlay- YUV Video overlay
    thumbSDL::Palette- Color palette for 8-bit pixel formats
    thumbSDL::PixelFormat- Stores surface format information
    thumbSDL::Rect- Defines a rectangular area
    thumbSDL::Surface- Graphic surface structure.
    thumbSDL::VideoInfo- Video Target Information

    Cookbook
    thumbSDL::Cookbook
    thumbSDL::Cookbook::PDL

    Extension
    thumbSDL::App- a SDL perl extension

    Mixer
    thumbSDL::Mixer- a SDL perl extension
    TODO
    Core
    MultiThread
    thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
    Structure
    thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
    Image
    thumbSDL::Image- Bindings for the SDL_Image library

    Tutorials
    thumbSDL::Tutorial- introduction to Perl SDL
    thumbSDL::Tutorial::Animation
    thumbSDL::Tutorial::Images
    thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL
    thumbSDL::Tutorial::Pong- Get started pong
    thumbSDL::Tutorial::Tetris- Let's Make Tetris

    UNCATEGORIZED
    thumbSDL::Font- a SDL perl extension
    thumbSDL::Game::Palette- a perl extension
    thumbSDL::MPEG- a SDL perl extension
    thumbSDL::Music- a perl extension
    thumbSDL::OpenGL- a perl extension
    thumbSDL::SFont- a perl extension
    thumbSDL::SMPEG- a SDL perl extension
    thumbSDL::Sound- a perl extension
    thumbSDL::TTFont- a SDL perl extension
    thumbSDL::Timer- a SDL perl extension for managing timers.
    thumbSDL::Tool::Font- a perl extension
    thumbSDL::Tool::Graphic
    thumbSDL::old-cdrom- a SDL perl extension for managing CD-ROM drives
    +

    Documentation (latest development branch)

    Core
    thumbSDL- Simple DirectMedia Layer for Perl
    Audio
    thumbSDL::Audio- SDL Bindings for Audio
    Structure
    thumbSDL::AudioCVT- Audio Conversion Structure
    thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
    CDROM
    thumbSDL::CDROM- SDL Bindings for the CDROM device
    Structure
    thumbSDL::CD- SDL Bindings for structure SDL_CD
    thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
    Events
    thumbSDL::Events- Bindings to the Events Category in SDL API
    Structure
    thumbSDL::Event- General event structure
    Joystick
    thumbSDL::Joystick- SDL Bindings for the Joystick device
    Structure
    thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
    thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic
    Mouse
    thumbSDL::Mouse- SDL Bindings for the Mouse device
    Structure
    thumbSDL::Cursor- Mouse cursor structure
    Structure
    thumbSDL::Version- SDL Bindings for structure SDL_Version
    Video
    thumbSDL::Video- Bindings to the video category in SDL API
    Structure
    thumbSDL::Color- Format independent color description
    thumbSDL::Overlay- YUV Video overlay
    thumbSDL::Palette- Color palette for 8-bit pixel formats
    thumbSDL::PixelFormat- Stores surface format information
    thumbSDL::Rect- Defines a rectangular area
    thumbSDL::Surface- Graphic surface structure.
    thumbSDL::VideoInfo- Video Target Information

    Cookbook
    thumbSDL::Cookbook
    thumbSDL::Cookbook::PDL

    Extension
    thumbSDL::App- a SDL perl extension

    Mixer
    thumbSDL::Mixer- a SDL perl extension
    TODO
    Core
    MultiThread
    thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
    Structure
    thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
    Image
    thumbSDL::Image- Bindings for the SDL_Image library

    Tutorials
    thumbSDL::Tutorial- introduction to Perl SDL
    thumbSDL::Tutorial::Animation
    thumbSDL::Tutorial::Images
    thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL
    thumbSDL::Tutorial::Pong- Get started pong
    thumbSDL::Tutorial::Tetris- Let's Make Tetris

    UNCATEGORIZED
    thumbSDL::Font- a SDL perl extension
    thumbSDL::Game::Palette- a perl extension
    thumbSDL::MPEG- a SDL perl extension
    thumbSDL::Music- a perl extension
    thumbSDL::OpenGL- a perl extension
    thumbSDL::SFont- a perl extension
    thumbSDL::SMPEG- a SDL perl extension
    thumbSDL::Sound- a perl extension
    thumbSDL::TTFont- a SDL perl extension
    thumbSDL::Timer- a SDL perl extension for managing timers.
    thumbSDL::Tool::Font- a perl extension
    thumbSDL::Tool::Graphic
    thumbSDL::old-cdrom- a SDL perl extension for managing CD-ROM drives