From: =?utf-8?q?Bastien_ROUCARI=C3=88S?= Date: Wed, 14 Dec 2016 15:18:12 +0100 Subject: Fix api/Image++.html Forwarded: Yes, https://github.com/ImageMagick/ImageMagick/issues/304 --- www/api/Image++.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) Index: imagemagick/www/api/Image++.html =================================================================== --- imagemagick.orig/www/api/Image++.html 2026-07-07 10:22:11.252060648 +0200 +++ imagemagick/www/api/Image++.html 2026-07-07 10:22:11.249678745 +0200 @@ -138,7 +138,7 @@ // Write the image to a file image.write( "x.gif" ); } - catch( Exception &error_ ) + catch( Exception &error_ ) { cout << "Caught exception: " << error_.what() << endl; return 1; @@ -162,8 +162,8 @@
  • Write the third image to a file.
  • -#include  
    -#include  
    +#include <Magick++.h> 
    +#include <iostream> 
     using namespace std; 
     using namespace Magick; 
     int main(int argc,char **argv) 
    @@ -186,7 +186,7 @@
     a 100 by 100 pixel white image with a red pixel in the center and
     writes it to a file: 

    -#include  
    +#include <Magick++.h> 
     using namespace std; 
     using namespace Magick; 
     int main(int argc,char **argv) 
    @@ -205,7 +205,6 @@
     image.quantizeColors( 256 ); 
     image.quantize( );
     
    -

    or, more simply:

      image.type( GrayscaleType );
    @@ -229,7 +228,7 @@
     

    An example of using Image to write to a Blob follows:

    -#include  
    +#include <Magick++.h> 
     using namespace std; 
     using namespace Magick; 
     int main(int argc,char **argv) 
    @@ -241,7 +240,7 @@
       // Write to BLOB in JPEG format 
       Blob blob; 
       image.magick( "JPEG" ) // Set JPEG output format 
    -  image.write( &blob );
    +  image.write( &blob );
     
       [ Use BLOB data (in JPEG format) here ]
     
    @@ -775,8 +774,8 @@
         
         
           
    -      
    extent - const Geometry &geometry_ +
    extent
    + const Geometry &geometry_ extends the image as defined by the geometry, gravity, and image background color.