Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 119e414702857d8461621b1713e3b817 > files > 510

cimg-devel-1.5.9-3.mga5.x86_64.rpm

<xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
    <title>The CImg Library - C++ Template Image Processing Toolkit</title>
    <meta content="David Tschumperle" name="author"></meta>
    <link rel="shortcut icon" type="image/x-icon" href="http://cimg.sourceforge.net/favicon.ico"></link>
    <link rel="icon" type="image/png" href="favicon.png"></link>
    <link href="doxygen.css" rel="stylesheet" type="text/css">
    <link href="tabs.css" rel="stylesheet" type="text/css">
    <style type="text/css">
      <!--
          body {background-color:#C0C0C0; font-family:sans-serif; }
          a { font-weight:bold; color:#636363; }
          a:active{text-decoration:none; color:#000000}
          a:link{text-decoration:none; color:#000000}
          a:visited{text-decoration:none; color:#000000}
          a:hover{text-decoration:underline; color:#4E9F71}
        -->
    </style>
    <script language="JavaScript" type="text/javascript">
      <!-- Original:  Eric King (eric_andrew_king@hotmail.com) is used to display images in popup windows -->
      <!-- Web Site:  http://redrival.com/eak/ -->
      <!-- This script and many more are available free online at -->
      <!-- The JavaScript Source!! http://javascript.internet.com -->
      <!-- Begin
           function NewWindow(mypage, myname, w, h, scroll) {
           var winl = (screen.width - w) / 2;
           var wint = (screen.height - h) / 2;
           winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
           win = window.open(mypage, myname, winprops)
           if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
           }
           //  End -->
    </script>
    <script type="text/javascript" src="../jquery-1.11.0.min.js"></script>
    <script type="text/javascript">
      $(document).ready(function() {
      $('#cssmenu > ul').prepend('<li class="mobile"><a href="#"><span>Menu <i>&#9776;</i></span></a></li>');
      $('#cssmenu > ul > li > a').click(function(e) {
      $('#cssmenu li').removeClass('active');
      $(this).closest('li').addClass('active');
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
      $(this).closest('li').removeClass('active');
      checkElement.slideUp('normal');
      }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
      $('#cssmenu ul ul:visible').slideUp('normal');
      checkElement.slideDown('normal');
      }
      if( $(this).parent().hasClass('mobile') ) {
      e.preventDefault();
      $('#cssmenu').toggleClass('expand');
      }
      if($(this).closest('li').find('ul').children().length == 0) {
      return true;
      } else {
      return false;
      }
      });
      });
    </script>
    <link rel="stylesheet" type="text/css" href="../header.css" />
  </head>
  <body>
    <table align="center" cellpadding="12" cellspacing="0" width="1024" style="border-style:solid; border-width:0px; border-color:black" bgcolor="#FFFFFF">
      <tr><td>
          <center>
            <hr noshade="noshade" size="1" width="90%"></hr>
            <br/>
            <a href="http://cimg.sourceforge.net"><img src="http://cimg.sourceforge.net/img/CImgLogo2.jpg" alt="" border="0"></img></a><br/>
            <br/>
            <hr noshade="noshade" size="1" width="90%"></hr>
            <table width="90%" align="center">
              <td width="18%">&nbsp;</td>
              <td width="65%">
                <div id='cssmenu'>
                  <ul>
                    <li class='first'><a href='http://cimg.sourceforge.net/index.shtml'><span>Home</span></a></li>
                    <li><a href='http://cimg.sourceforge.net/download.shtml'><span>Download</span></a></li>
                    <li><a href='http://cimg.sourceforge.net/screenshots.shtml'><span>Screenshots</span></a></li>
                    <li><a href='http://cimg.sourceforge.net/reference/group__cimg__faq.html'><span>FAQ</span></a></li>
                    <li><a href='http://cimg.sourceforge.net/reference/group__cimg__tutorial.html'><span>Tutorial</span></a></li>
                    <li><a href='http://cimg.sourceforge.net/reference/index.html'><span>Documentation</span></a></li>
                    <li><a href='http://sourceforge.net/projects/cimg/forums/forum/334630'><span>Forum</span></a></li>
                    <li><a href='http://cimg.sourceforge.net/links.shtml'><span>Links</span></a></li>
                  </ul>
                </div>
              </td>
              <td align="right">
                <script type="text/javascript">
	          var flattr_url = 'http://cimg.sourceforge.net';
	          var flattr_btn='compact';
                </script>
                <script src="http://api.flattr.com/button/load.js" type="text/javascript"></script>
              </td>
      </tr></table>
      </center>
</td></tr>
<tr><td>
<!-- Generated by Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecimg__library.html">cimg_library</a></li><li class="navelem"><a class="el" href="structcimg__library_1_1CImgException.html">CImgException</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="structcimg__library_1_1CImgException-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CImgException Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Instances of <code><a class="el" href="structcimg__library_1_1CImgException.html" title="Instances of CImgException are thrown when errors are encountered in a CImg function call...">CImgException</a></code> are thrown when errors are encountered in a <code>CImg</code> function call.  
 <a href="structcimg__library_1_1CImgException.html#details">More...</a></p>

<p>Inherits exception.</p>

<p>Inherited by CImgArgumentException, CImgDisplayException, CImgInstanceException, CImgIOException, and CImgWarningException.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a586eee248fedb7de1b50219e14b99c7b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a586eee248fedb7de1b50219e14b99c7b"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcimg__library_1_1CImgException.html#a586eee248fedb7de1b50219e14b99c7b">what</a> () const   throw ()</td></tr>
<tr class="memdesc:a586eee248fedb7de1b50219e14b99c7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a C-string containing the error message associated to the thrown exception. <br /></td></tr>
<tr class="separator:a586eee248fedb7de1b50219e14b99c7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Instances of <code><a class="el" href="structcimg__library_1_1CImgException.html" title="Instances of CImgException are thrown when errors are encountered in a CImg function call...">CImgException</a></code> are thrown when errors are encountered in a <code>CImg</code> function call. </p>
<dl class="section user"><dt>Overview</dt><dd></dd></dl>
<p><a class="el" href="structcimg__library_1_1CImgException.html" title="Instances of CImgException are thrown when errors are encountered in a CImg function call...">CImgException</a> is the base class of all exceptions thrown by <code>CImg</code>. <a class="el" href="structcimg__library_1_1CImgException.html" title="Instances of CImgException are thrown when errors are encountered in a CImg function call...">CImgException</a> is never thrown itself. Derived classes that specify the type of errord are thrown instead. These derived classes can be:</p>
<ul>
<li><b>CImgArgumentException:</b> Thrown when one argument of a called <code>CImg</code> function is invalid. This is probably one of the most thrown exception by <code>CImg</code>. For instance, the following example throws a <code>CImgArgumentException:</code> <div class="fragment"><div class="line">CImg&lt;float&gt; img(100,100,1,3); <span class="comment">// Define a 100x100 color image with float-valued pixels.</span></div>
<div class="line">img.mirror(<span class="charliteral">&#39;e&#39;</span>);              <span class="comment">// Try to mirror image along the (non-existing) &#39;e&#39;-axis.</span></div>
</div><!-- fragment --></li>
<li><b>CImgDisplayException:</b> Thrown when something went wrong during the display of images in <a class="el" href="structcimg__library_1_1CImgDisplay.html" title="Allow to create windows, display images on them and manage user events (keyboard, mouse and windows e...">CImgDisplay</a> instances.</li>
<li><b>CImgInstanceException:</b> Thrown when an instance associated to a called <code>CImg</code> method does not fit the function requirements. For instance, the following example throws a <code>CImgInstanceException:</code> <div class="fragment"><div class="line"><span class="keyword">const</span> CImg&lt;float&gt; img;           <span class="comment">// Define an empty image.</span></div>
<div class="line"><span class="keyword">const</span> <span class="keywordtype">float</span> value = img.at(0);   <span class="comment">// Try to read first pixel value (does not exist).</span></div>
</div><!-- fragment --></li>
<li><b>CImgIOException:</b> Thrown when an error occured when trying to load or save image files. This happens when trying to read files that do not exist or with invalid formats. For instance, the following example throws a <code>CImgIOException:</code> <div class="fragment"><div class="line"><span class="keyword">const</span> CImg&lt;float&gt; img(<span class="stringliteral">&quot;missing_file.jpg&quot;</span>);  <span class="comment">// Try to load a file that does not exist.</span></div>
</div><!-- fragment --></li>
<li><b>CImgWarningException:</b> Thrown only if configuration macro <code>cimg_strict_warnings</code> is set, and when a <code>CImg</code> function has to display a warning message (see <a class="el" href="namespacecimg__library_1_1cimg.html#a5ee7f021ed42b0ac32e1254414c3faab" title="Display a warning message on the default output stream. ">cimg::warn()</a>).</li>
</ul>
<p>It is not recommended to throw <a class="el" href="structcimg__library_1_1CImgException.html" title="Instances of CImgException are thrown when errors are encountered in a CImg function call...">CImgException</a> instances by yourself, since they are expected to be thrown only by <code>CImg</code>. When an error occurs in a library function call, <code>CImg</code> may display error messages on the screen or on the standard output, depending on the current <code>CImg</code> exception mode. The <code>CImg</code> exception mode can be get and set by functions <a class="el" href="namespacecimg__library_1_1cimg.html#a933d23f5cc8c7bd672541c5e758328ba" title="Set current CImg exception mode. ">cimg::exception_mode()</a> and <a class="el" href="namespacecimg__library_1_1cimg.html#a933d23f5cc8c7bd672541c5e758328ba" title="Set current CImg exception mode. ">cimg::exception_mode(unsigned int)</a>.</p>
<dl class="section user"><dt>Exceptions handling</dt><dd></dd></dl>
<p>In all cases, when an error occurs in <code>CImg</code>, an instance of the corresponding exception class is thrown. This may lead the program to break (this is the default behavior), but you can bypass this behavior by handling the exceptions by yourself, using a usual <code>try { ... } catch () { ... }</code> bloc, as in the following example: </p><div class="fragment"><div class="line"><span class="preprocessor">#define &quot;CImg.h&quot;</span></div>
<div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacecimg__library.html">cimg_library</a>;</div>
<div class="line"><span class="keywordtype">int</span> main() {</div>
<div class="line">  <a class="code" href="namespacecimg__library_1_1cimg.html#a933d23f5cc8c7bd672541c5e758328ba">cimg::exception_mode</a>(0);                                    <span class="comment">// Enable quiet exception mode.</span></div>
<div class="line">  <span class="keywordflow">try</span> {</div>
<div class="line">    ...                                                       <span class="comment">// Here, do what you want to stress the CImg library.</span></div>
<div class="line">  } <span class="keywordflow">catch</span> (<a class="code" href="structcimg__library_1_1CImgException.html">CImgException</a> &amp;e) {                                <span class="comment">// You succeeded: something went wrong!</span></div>
<div class="line">    std::fprintf(stderr,<span class="stringliteral">&quot;CImg Library Error: %s&quot;</span>,e.<a class="code" href="structcimg__library_1_1CImgException.html#a586eee248fedb7de1b50219e14b99c7b">what</a>());   <span class="comment">// Display your custom error message.</span></div>
<div class="line">    ...                                                       <span class="comment">// Do what you want now to save the ship!</span></div>
<div class="line">    }</div>
<div class="line">  }</div>
</div><!-- fragment --> </div></div><!-- contents -->
</td></tr></table>
<center>
<p>
<a href="http://sourceforge.net">
  <img src="http://sourceforge.net/sflogo.php?group_id=96492&amp;type=3" border="0" height="37" width="125"></img>
</a>
<a href="http://sourceforge.net/donate/index.php?group_id=96492"><img src="http://images.sourceforge.net/images/project-support.jpg" width="88" height="32" border="0" alt="Support This Project" /> </a>
</p>
</center>
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
  <!--
      var sc_project=895001;
      var sc_invisible=1;
      var sc_partition=7;
      var sc_security="5ea85181";
      //-->
</script>
<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c8.statcounter.com/counter.php?sc_project=895001&amp;java=0&amp;security=5ea85181&amp;invisible=1" alt="counter stats" border="0"></a> </noscript>
<!-- End of StatCounter Code -->
<!-- Google Analytics -->
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-16976814-2']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
<!-- End Google Analytics -->
</body>
</html>