| 1 |
From: =?utf-8?q?Bastien_ROUCARI=C3=88S?= <[email protected]> |
| 2 |
Date: Wed, 14 Dec 2016 15:18:12 +0100 |
| 3 |
Subject: Fix api/Image++.html |
| 4 |
|
| 5 |
Forwarded: Yes, https://github.com/ImageMagick/ImageMagick/issues/304 |
| 6 |
--- |
| 7 |
www/api/Image++.html | 17 ++++++++--------- |
| 8 |
1 file changed, 8 insertions(+), 9 deletions(-) |
| 9 |
|
| 10 |
Index: imagemagick/www/api/Image++.html |
| 11 |
=================================================================== |
| 12 |
--- imagemagick.orig/www/api/Image++.html 2026-07-07 10:22:11.252060648 +0200 |
| 13 |
+++ imagemagick/www/api/Image++.html 2026-07-07 10:22:11.249678745 +0200 |
| 14 |
@@ -138,7 +138,7 @@ |
| 15 |
// Write the image to a file |
| 16 |
image.write( "x.gif" ); |
| 17 |
} |
| 18 |
|
| 19 |
+ catch( Exception &error_ ) |
| 20 |
{ |
| 21 |
cout << "Caught exception: " << error_.what() << endl; |
| 22 |
return 1; |
| 23 |
@@ -162,8 +162,8 @@ |
| 24 |
<li> Write the third image to a file.</li> |
| 25 |
</ol> |
| 26 |
<pre class="code"> |
| 27 |
|
| 28 |
|
| 29 |
+#include <Magick++.h> |
| 30 |
+#include <iostream> |
| 31 |
using namespace std; |
| 32 |
using namespace Magick; |
| 33 |
int main(int argc,char **argv) |
| 34 |
@@ -186,7 +186,7 @@ |
| 35 |
a 100 by 100 pixel white image with a red pixel in the center and |
| 36 |
writes it to a file: </p> |
| 37 |
<pre class="code"> |
| 38 |
|
| 39 |
+#include <Magick++.h> |
| 40 |
using namespace std; |
| 41 |
using namespace Magick; |
| 42 |
int main(int argc,char **argv) |
| 43 |
@@ -205,7 +205,6 @@ |
| 44 |
image.quantizeColors( 256 ); |
| 45 |
image.quantize( ); |
| 46 |
</pre> |
| 47 |
|
| 48 |
<p>or, more simply: </p> |
| 49 |
<pre class="code"> |
| 50 |
image.type( GrayscaleType ); |
| 51 |
@@ -229,7 +228,7 @@ |
| 52 |
<p>An example of using Image to write to a Blob follows: <br /> |
| 53 |
</p> |
| 54 |
<pre class="code"> |
| 55 |
|
| 56 |
+#include <Magick++.h> |
| 57 |
using namespace std; |
| 58 |
using namespace Magick; |
| 59 |
int main(int argc,char **argv) |
| 60 |
@@ -241,7 +240,7 @@ |
| 61 |
// Write to BLOB in JPEG format |
| 62 |
Blob blob; |
| 63 |
image.magick( "JPEG" ) // Set JPEG output format |
| 64 |
|
| 65 |
+ image.write( &blob ); |
| 66 |
|
| 67 |
[ Use BLOB data (in JPEG format) here ] |
| 68 |
|
| 69 |
@@ -775,8 +774,8 @@ |
| 70 |
</tr> |
| 71 |
<tr> |
| 72 |
<td style="text-align: center;" rowspan="4"> |
| 73 |
|
| 74 |
|
| 75 |
+ <center><a name="extent"></a> <font size="-1">extent</font></center></td> |
| 76 |
+ <td><font size="-1">const <a href="https://www.imagemagick.org/Magick++/Geometry.html"> Geometry</a> &geometry_</font></td> |
| 77 |
<td rowspan="2"><font size="-1">extends the image as defined by the geometry, gravity, and image background color.</font></td> |
| 78 |
</tr> |
| 79 |
<tr> |