fixed url-generator
[sdlgit/SDL-Site.git] / pages / SDL-Image.html-inc
index eb4b346..8faed1e 100644 (file)
@@ -7,40 +7,46 @@
 <li><a href="#CATEGORY">CATEGORY</a></li>
 <li><a href="#SUPPORTED_FORMATS">SUPPORTED FORMATS </a></li>
 <li><a href="#LOADING_METHODS">LOADING METHODS</a>
-<ul><li><a href="#load">load</a></li>
-<li><a href="#Returns">Returns</a></li>
+<ul><li><a href="#load">load</a>
+<ul><li><a href="#Return">Return</a></li>
+</ul>
+</li>
 <li><a href="#load_typed_rw">load_typed_rw</a>
 <ul><li><a href="#Transparency">Transparency </a></li>
-<li><a href="#Return">Return </a></li>
+<li><a href="#Return-2">Return </a></li>
 </ul>
 </li>
 <li><a href="#is_TYPE">is_[TYPE]</a>
-<ul><li><a href="#Return-2">Return</a></li>
+<ul><li><a href="#Return-3">Return</a></li>
 <li><a href="#Example">Example</a></li>
 </ul>
 </li>
 <li><a href="#load_TYPE_rw">load_[TYPE]_rw</a>
-<ul><li><a href="#Return-2">Return</a></li>
+<ul><li><a href="#Return-4">Return</a></li>
 <li><a href="#Example-2">Example</a></li>
 </ul>
 </li>
 <li><a href="#read_XPM_from_array">read_XPM_from_array</a>
-<ul><li><a href="#Return-2-2">Return</a></li>
+<ul><li><a href="#Return-5">Return</a></li>
 <li><a href="#Example-3">Example</a></li>
 </ul>
 </li>
 </ul>
 </li>
 <li><a href="#MISC_METHODS">MISC METHODS</a>
-<ul><li><a href="#linked_version">linked_version</a></li>
+<ul><li><a href="#linked_version">linked_version</a>
+<ul><li><a href="#Return-6">Return</a></li>
+<li><a href="#Example-4">Example</a></li>
+</ul>
+</li>
 <li><a href="#init">init</a>
 <ul><li><a href="#Flags">Flags</a></li>
-<li><a href="#Return-2-3">Return</a></li>
-<li><a href="#Example-4">Example</a></li>
+<li><a href="#Return-7">Return</a></li>
+<li><a href="#Example-5">Example</a></li>
 </ul>
 </li>
 <li><a href="#quit">quit</a>
-<ul><li><a href="#Example-5">Example</a></li>
+<ul><li><a href="#Example-6">Example</a></li>
 </ul>
 </li>
 <li><a href="#set_error">set_error</a></li>
@@ -64,7 +70,7 @@
 </div>
 <h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
 <div id="CATEGORY_CONTENT">
-<p>SDL, Image</p>
+<p>Image</p>
 
 </div>
 <h1 id="SUPPORTED_FORMATS">SUPPORTED FORMATS </h1><p><a href="#TOP" class="toplink">Top</a></p>
@@ -141,19 +147,19 @@ HAM6, HAM8, and 24bit types are not supported. </p>
 
 </pre>
 <p>$file Image file name to load a surface from. </p>
-<p>Load file for use as an image in a new <a href="/SDL-Surface.html">SDL::Surface</a>. This actually calls <code>IMG_LoadTyped_RW</code> the binded function to <a href="/SDL-Image::load_typed_rw.html">SDL::Image::load_typed_rw</a>, 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 &quot;.tga&quot;. 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 <a href="/SDL-Image::init.html">SDL::Image::init</a> to load support for your image format.
-Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html">SDL::Image</a> will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling:
-<a href="/SDL-Video::set_color_key.html">SDL::Video::set_color_key</a></p>
+<p>Load file for use as an image in a new <a href="SDL-Surface.html">SDL::Surface</a>. This actually calls <code>IMG_LoadTyped_RW</code> the binded function to <a href="/SDL-Image.html#load_typed_rw">SDL::Image::load_typed_rw</a>, 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 &quot;.tga&quot;. 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 <a href="/SDL-Image.html#init">SDL::Image::init</a> to load support for your image format.
+Note: If the image format supports a transparent pixel, <a href="SDL-Image.html">SDL::Image</a> will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling:
+<a href="/SDL-Video.html#set_color_key">SDL::Video::set_color_key</a></p>
 <pre>  my $image = SDL::Image::load( $some_png_file );
   SDL::Video::set_color_key($image, SDL_RLEACCEL, $image-&gt;format-&gt;colorkey);
 
 </pre>
 
 </div>
-<h2 id="Returns">Returns</h2>
-<div id="Returns_CONTENT">
-<p>An image as a <a href="/SDL-Surface.html">SDL::Surface</a>. NULL is returned on errors, such as no support built for the image, or a file reading error. Use <a href="/SDL-get_error.html">SDL::get_error</a> to get cause of error.</p>
+<h3 id="Return">Return</h3>
+<div id="Return_CONTENT">
+<p>An image as a <a href="SDL-Surface.html">SDL::Surface</a>. NULL is returned on errors, such as no support built for the image, or a file reading error. Use <a href="/SDL.html#get_error">SDL::get_error</a> to get cause of error.</p>
 
 </div>
 <h2 id="load_typed_rw">load_typed_rw</h2>
@@ -164,7 +170,7 @@ Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html
 <dl>
        <dt>src</dt>
        <dd>
-               <p>The source <a href="/SDL-RWops.html">SDL::RWops</a> as a pointer. The image is loaded from this. </p>
+               <p>The source <a href="SDL-RWops.html">SDL::RWops</a> as a pointer. The image is loaded from this. </p>
        </dd>
        <dt>freesrc</dt>
        <dd>
@@ -195,9 +201,9 @@ Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html
        </dd>
 </dl>
 <p>Load src for use as a surface. This can load all supported image formats. This method does not guarantee that the format specified by type is the format of the loaded image, except in the case when TGA format is specified (or any other non-magicable format in the future). Using SDL_RWops is not covered here, but they enable you to load from almost any source.
-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 <a href="/SDL-Image::init.html">SDL::Image::init</a> to load support for your image format.
-Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html">SDL::Image</a> will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling:
-<a href="/SDL-Video::set_color_key.html">SDL::Video::set_color_key</a></p>
+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 <a href="/SDL-Image.html#init">SDL::Image::init</a> to load support for your image format.
+Note: If the image format supports a transparent pixel, <a href="SDL-Image.html">SDL::Image</a> will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling:
+<a href="/SDL-Video.html#set_color_key">SDL::Video::set_color_key</a></p>
 
 </div>
 <h3 id="Transparency">Transparency </h3>
@@ -214,9 +220,9 @@ Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html
 </pre>
 
 </div>
-<h3 id="Return">Return </h3>
-<div id="Return_CONTENT">
-<p>The image as a new <a href="/SDL-Surface.html">SDL::Surface</a>. NULL is returned on errors. </p>
+<h3 id="Return-2">Return </h3>
+<div id="Return_CONTENT-2">
+<p>The image as a new <a href="SDL-Surface.html">SDL::Surface</a>. NULL is returned on errors. </p>
 
 </div>
 <h2 id="is_TYPE">is_[TYPE]</h2>
@@ -237,11 +243,11 @@ Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html
        <dt>is_XPM</dt>
        <dt>is_XV</dt>
 </dl>
-<p>These functions take a <a href="/SDL-RWOps.html">SDL::RWOps</a> as a parameter.</p>
+<p>These functions take a <a href="SDL-RWOps.html">SDL::RWOps</a> as a parameter.</p>
 
 </div>
-<h3 id="Return-2">Return</h3>
-<div id="Return_CONTENT-2">
+<h3 id="Return-3">Return</h3>
+<div id="Return_CONTENT-3">
 <p>1 if the image is a valid [TYPE]  and the [TYPE] format support is compiled into SDL_image. 0 is returned otherwise. </p>
 
 </div>
@@ -275,12 +281,12 @@ Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html
        <dt>load_XPM_rw</dt>
        <dt>load_XV_rw</dt>
 </dl>
-<p>These functions take a <a href="/SDL-RWop.html">SDL::RWop</a> as a parameter</p>
+<p>These functions take a <a href="SDL-RWop.html">SDL::RWop</a> as a parameter</p>
 
 </div>
-<h3 id="Return-2">Return</h3>
-<div id="Return_CONTENT-2">
-<p>The image as a new <a href="/SDL-Surface.html">SDL::Surface</a>. NULL is returned on errors, like if the [TYPE] is not supported, or a read error.</p>
+<h3 id="Return-4">Return</h3>
+<div id="Return_CONTENT-4">
+<p>The image as a new <a href="SDL-Surface.html">SDL::Surface</a>. NULL is returned on errors, like if the [TYPE] is not supported, or a read error.</p>
 
 </div>
 <h3 id="Example-2">Example</h3>
@@ -306,9 +312,9 @@ Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html
 <p>This functions takes the reference of an array in the valid @XPM format. Also the $width of the XPM image.</p>
 
 </div>
-<h3 id="Return-2-2">Return</h3>
-<div id="Return_CONTENT-2-2">
-<p>The image as a new <a href="/SDL-Surface.html">SDL::Surface</a>. NULL is returned on errors, like if XPM is not supported, or a read error. </p>
+<h3 id="Return-5">Return</h3>
+<div id="Return_CONTENT-5">
+<p>The image as a new <a href="SDL-Surface.html">SDL::Surface</a>. NULL is returned on errors, like if XPM is not supported, or a read error. </p>
 
 </div>
 <h3 id="Example-3">Example</h3>
@@ -366,7 +372,16 @@ Note: If the image format supports a transparent pixel, <a href="/SDL-Image.html
 </div>
 <h2 id="linked_version">linked_version</h2>
 <div id="linked_version_CONTENT">
-<p>Provides the version of linked sdl_image library. see <a href="/SDL-Version.html">SDL::Version</a></p>
+<p>Provides the version of linked sdl_image library.</p>
+
+</div>
+<h3 id="Return-6">Return</h3>
+<div id="Return_CONTENT-6">
+<p>Returns a <a href="SDL-Version.html">SDL::Version</a> object</p>
+
+</div>
+<h3 id="Example-4">Example</h3>
+<div id="Example_CONTENT-4">
 <pre>  my $version = SDL::Image::linked_version();
        print $version-&gt;major.' '.$version-&gt;minor.' '.$version-&gt;patch;
 
@@ -392,13 +407,13 @@ Note: No initialization is needed nor performed when using the SDL::Image::is_JP
 Note: this function does not always set the error string, so do not depend on SDL::Image::get_error being meaningful all the time.  </p>
 
 </div>
-<h3 id="Return-2-3">Return</h3>
-<div id="Return_CONTENT-2-3">
+<h3 id="Return-7">Return</h3>
+<div id="Return_CONTENT-7">
 <p>A bitmask of all the currently inited image loaders.</p>
 
 </div>
-<h3 id="Example-4">Example</h3>
-<div id="Example_CONTENT-4">
+<h3 id="Example-5">Example</h3>
+<div id="Example_CONTENT-5">
 <pre>  use SDL::Image;
   my $flags = IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_JPG;
   my $inited = SDL::Image::init($flags);
@@ -409,11 +424,11 @@ Note: this function does not always set the error string, so do not depend on SD
 <h2 id="quit">quit</h2>
 <div id="quit_CONTENT">
 <p><strong>For version SDL_image 1.2.10 and up</strong></p>
-<p>This function cleans up all dynamically loaded library handles, freeing memory. If support is required again it will be initialized again, either by <a href="/SDL-Image::init.html">SDL::Image::init</a> or loading an image with dynamic support required. You may call this function when <a href="/SDL-Image::load.html">SDL::Image::load</a> functions are no longer needed for the JPG, PNG, and TIF image formats. You only need to call this function once, no matter how many times <a href="/SDL-Image::init.html">SDL::Image::init</a> was called. </p>
+<p>This function cleans up all dynamically loaded library handles, freeing memory. If support is required again it will be initialized again, either by <a href="/SDL-Image.html#init">SDL::Image::init</a> or loading an image with dynamic support required. You may call this function when <a href="/SDL-Image.html#load">SDL::Image::load</a> functions are no longer needed for the JPG, PNG, and TIF image formats. You only need to call this function once, no matter how many times <a href="/SDL-Image.html#init">SDL::Image::init</a> was called. </p>
 
 </div>
-<h3 id="Example-5">Example</h3>
-<div id="Example_CONTENT-5">
+<h3 id="Example-6">Example</h3>
+<div id="Example_CONTENT-6">
 <pre> use SDL::Image;
  SDL::Image::init(IMG_INIT_JPG); #loads JPG support
  SDL::Image::load(&quot;file.png&quot;); #loads PNG support
@@ -424,17 +439,17 @@ Note: this function does not always set the error string, so do not depend on SD
 </div>
 <h2 id="set_error">set_error</h2>
 <div id="set_error_CONTENT">
-<p>Same as <a href="/SDL-set_error.html">SDL::set_error</a></p>
+<p>Same as <a href="/SDL.html#set_error">SDL::set_error</a></p>
 
 </div>
 <h2 id="get_error">get_error</h2>
 <div id="get_error_CONTENT">
-<p>Same as <a href="/SDL-get_error.html">SDL::get_error</a></p>
+<p>Same as <a href="/SDL.html#get_error">SDL::get_error</a></p>
 
 </div>
 <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
 <div id="SEE_ALSO_CONTENT">
-<p><a href="/SDL.html">SDL</a>, <a href="/SDL-Surface.html">SDL::Surface</a>, <a href="/SDL-Video.html">SDL::Video</a>, <a href="/SDL-RWOps.html">SDL::RWOps</a></p>
+<p><a href="SDL.html">SDL</a>, <a href="SDL-Surface.html">SDL::Surface</a>, <a href="SDL-Video.html">SDL::Video</a>, <a href="SDL-RWOps.html">SDL::RWOps</a></p>
 
 </div>
 </div>
\ No newline at end of file