Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 1 | |
| 2 | |
| 3 | |
| 4 | |
cristy | 29dc865 | 2015-05-12 16:26:21 +0000 | [diff] [blame] | 5 | <!DOCTYPE html> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 6 | <html lang="en"> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 7 | <head> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 8 | <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 9 | <title>ImageMagick: MagickCore, C API for ImageMagick: Read or Write Binary Large OBjects</title> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 10 | <meta http-equiv="content-type" content="text/html; charset=utf-8"/> |
| 11 | <meta name="application-name" content="ImageMagick"/> |
| 12 | <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/> |
| 13 | <meta name="application-url" content="http://www.imagemagick.org"/> |
| 14 | <meta name="generator" content="PHP"/> |
| 15 | <meta name="keywords" content="magickcore, c, api, for, imagemagick:, read, or, write, binary, large, objects, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/> |
| 16 | <meta name="rating" content="GENERAL"/> |
| 17 | <meta name="robots" content="INDEX, FOLLOW"/> |
| 18 | <meta name="generator" content="ImageMagick Studio LLC"/> |
| 19 | <meta name="author" content="ImageMagick Studio LLC"/> |
| 20 | <meta name="revisit-after" content="2 DAYS"/> |
| 21 | <meta name="resource-type" content="document"/> |
Cristy | ce4a355 | 2015-12-14 13:53:35 -0500 | [diff] [blame] | 22 | <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 23 | <meta name="distribution" content="Global"/> |
| 24 | <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/> |
| 25 | <link rel="icon" href="../images/wand.png"/> |
| 26 | <link rel="shortcut icon" href="../images/wand.ico"/> |
| 27 | <link rel="stylesheet" href="../css/magick.html"/> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 28 | </head> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 29 | <body> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 30 | <div class="main"> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 31 | <div class="magick-masthead"> |
| 32 | <div class="container"> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 33 | <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 34 | style="display:block" |
| 35 | data-ad-client="ca-pub-3129977114552745" |
| 36 | data-ad-slot="6345125851" |
| 37 | data-ad-format="auto"></ins> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 38 | <script> |
Cristy | 542697a | 2015-10-12 20:10:32 -0400 | [diff] [blame] | 39 | (adsbygoogle = window.adsbygoogle || []).push({}); |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 40 | </script> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 41 | <nav class="magick-nav"> |
cristy | 2f563d4 | 2015-05-06 23:36:51 +0000 | [diff] [blame] | 42 | <a class="magick-nav-item " href="../index.html">Home</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 43 | <a class="magick-nav-item " href="../binary-releases.html">Download</a> |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 44 | <a class="magick-nav-item " href="../command-line-tools.html">Tools</a> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 45 | <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 46 | <a class="magick-nav-item " href="../resources.html">Resources</a> |
| 47 | <a class="magick-nav-item " href="api.html">Develop</a> |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 48 | <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a> |
cristy | a1890f0 | 2015-05-15 23:32:44 +0000 | [diff] [blame] | 49 | <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 50 | </nav> |
| 51 | </div> |
| 52 | </div> |
| 53 | <div class="container"> |
cristy | 4e638cd | 2015-05-07 16:47:40 +0000 | [diff] [blame] | 54 | <div class="magick-header"> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 55 | <p class="text-center"><a href="blob.html#BlobToImage">BlobToImage</a> • <a href="blob.html#FileToImage">FileToImage</a> • <a href="blob.html#GetBlobProperties">GetBlobProperties</a> • <a href="blob.html#ImageToBlob">ImageToBlob</a> • <a href="blob.html#ImageToFile">ImageToFile</a> • <a href="blob.html#ImagesToBlob">ImagesToBlob</a> • <a href="blob.html#InjectImageBlob">InjectImageBlob</a></p> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 56 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 57 | <h2><a href="http://www.imagemagick.org/api/MagickCore/blob_8c.html" id="BlobToImage">BlobToImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 58 | |
| 59 | <p>BlobToImage() implements direct to memory image formats. It returns the blob as an image.</p> |
| 60 | |
| 61 | <p>The format of the BlobToImage method is:</p> |
| 62 | |
| 63 | <pre class="text"> |
| 64 | Image *BlobToImage(const ImageInfo *image_info,const void *blob, |
| 65 | const size_t length,ExceptionInfo *exception) |
| 66 | </pre> |
| 67 | |
| 68 | <p>A description of each parameter follows:</p> |
| 69 | |
| 70 | <dd> |
| 71 | </dd> |
| 72 | |
| 73 | <dd> </dd> |
| 74 | <dl class="dl-horizontal"> |
| 75 | <dt>image_info</dt> |
| 76 | <dd>the image info. </dd> |
| 77 | |
| 78 | <dd> </dd> |
| 79 | <dt>blob</dt> |
| 80 | <dd>the address of a character stream in one of the image formats understood by ImageMagick. </dd> |
| 81 | |
| 82 | <dd> </dd> |
| 83 | <dt>length</dt> |
| 84 | <dd>This size_t integer reflects the length in bytes of the blob. </dd> |
| 85 | |
| 86 | <dd> </dd> |
| 87 | <dt>exception</dt> |
| 88 | <dd>return any errors or warnings in this structure. </dd> |
| 89 | |
| 90 | <dd> </dd> |
| 91 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 92 | <h2><a href="http://www.imagemagick.org/api/MagickCore/blob_8c.html" id="FileToImage">FileToImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 93 | |
| 94 | <p>FileToImage() write the contents of a file to an image.</p> |
| 95 | |
| 96 | <p>The format of the FileToImage method is:</p> |
| 97 | |
| 98 | <pre class="text"> |
| 99 | MagickBooleanType FileToImage(Image *,const char *filename) |
| 100 | </pre> |
| 101 | |
| 102 | <p>A description of each parameter follows:</p> |
| 103 | |
| 104 | <dd> |
| 105 | </dd> |
| 106 | |
| 107 | <dd> </dd> |
| 108 | <dl class="dl-horizontal"> |
| 109 | <dt>image</dt> |
| 110 | <dd>the image. </dd> |
| 111 | |
| 112 | <dd> </dd> |
| 113 | <dt>filename</dt> |
| 114 | <dd>the filename. </dd> |
| 115 | |
| 116 | <dd> </dd> |
| 117 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 118 | <h2><a href="http://www.imagemagick.org/api/MagickCore/blob_8c.html" id="GetBlobProperties">GetBlobProperties</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 119 | |
| 120 | <p>GetBlobProperties() returns information about an image blob.</p> |
| 121 | |
| 122 | <p>The format of the GetBlobProperties method is:</p> |
| 123 | |
| 124 | <pre class="text"> |
| 125 | const struct stat *GetBlobProperties(const Image *image) |
| 126 | </pre> |
| 127 | |
| 128 | <p>A description of each parameter follows:</p> |
| 129 | |
| 130 | <dd> |
| 131 | </dd> |
| 132 | |
| 133 | <dd> </dd> |
| 134 | <dl class="dl-horizontal"> |
| 135 | <dt>image</dt> |
| 136 | <dd>the image. </dd> |
| 137 | |
| 138 | <dd> </dd> |
| 139 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 140 | <h2><a href="http://www.imagemagick.org/api/MagickCore/blob_8c.html" id="ImageToBlob">ImageToBlob</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 141 | |
| 142 | <p>ImageToBlob() implements direct to memory image formats. It returns the image as a formatted blob and its length. The magick member of the Image structure determines the format of the returned blob (GIF, JPEG, PNG, etc.). This method is the equivalent of WriteImage(), but writes the formatted "file" to a memory buffer rather than to an actual file.</p> |
| 143 | |
| 144 | <p>The format of the ImageToBlob method is:</p> |
| 145 | |
| 146 | <pre class="text"> |
| 147 | void *ImageToBlob(const ImageInfo *image_info,Image *image, |
| 148 | size_t *length,ExceptionInfo *exception) |
| 149 | </pre> |
| 150 | |
| 151 | <p>A description of each parameter follows:</p> |
| 152 | |
| 153 | <dd> |
| 154 | </dd> |
| 155 | |
| 156 | <dd> </dd> |
| 157 | <dl class="dl-horizontal"> |
| 158 | <dt>image_info</dt> |
| 159 | <dd>the image info. </dd> |
| 160 | |
| 161 | <dd> </dd> |
| 162 | <dt>image</dt> |
| 163 | <dd>the image. </dd> |
| 164 | |
| 165 | <dd> </dd> |
| 166 | <dt>length</dt> |
| 167 | <dd>return the actual length of the blob. </dd> |
| 168 | |
| 169 | <dd> </dd> |
| 170 | <dt>exception</dt> |
| 171 | <dd>return any errors or warnings in this structure. </dd> |
| 172 | |
| 173 | <dd> </dd> |
| 174 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 175 | <h2><a href="http://www.imagemagick.org/api/MagickCore/blob_8c.html" id="ImageToFile">ImageToFile</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 176 | |
| 177 | <p>ImageToFile() writes an image to a file. It returns MagickFalse if an error occurs otherwise MagickTrue.</p> |
| 178 | |
| 179 | <p>The format of the ImageToFile method is:</p> |
| 180 | |
| 181 | <pre class="text"> |
| 182 | MagickBooleanType ImageToFile(Image *image,char *filename, |
| 183 | ExceptionInfo *exception) |
| 184 | </pre> |
| 185 | |
| 186 | <p>A description of each parameter follows:</p> |
| 187 | |
| 188 | <dd> |
| 189 | </dd> |
| 190 | |
| 191 | <dd> </dd> |
| 192 | <dl class="dl-horizontal"> |
| 193 | <dt>image</dt> |
| 194 | <dd>the image. </dd> |
| 195 | |
| 196 | <dd> </dd> |
| 197 | <dt>filename</dt> |
| 198 | <dd>Write the image to this file. </dd> |
| 199 | |
| 200 | <dd> </dd> |
| 201 | <dt>exception</dt> |
| 202 | <dd>return any errors or warnings in this structure. </dd> |
| 203 | |
| 204 | <dd> </dd> |
| 205 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 206 | <h2><a href="http://www.imagemagick.org/api/MagickCore/blob_8c.html" id="ImagesToBlob">ImagesToBlob</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 207 | |
| 208 | <p>ImagesToBlob() implements direct to memory image formats. It returns the image sequence as a blob and its length. The magick member of the ImageInfo structure determines the format of the returned blob (GIF, JPEG, PNG, etc.)</p> |
| 209 | |
| 210 | <p>Note, some image formats do not permit multiple images to the same image stream (e.g. JPEG). in this instance, just the first image of the sequence is returned as a blob.</p> |
| 211 | |
| 212 | <p>The format of the ImagesToBlob method is:</p> |
| 213 | |
| 214 | <pre class="text"> |
| 215 | void *ImagesToBlob(const ImageInfo *image_info,Image *images, |
| 216 | size_t *length,ExceptionInfo *exception) |
| 217 | </pre> |
| 218 | |
| 219 | <p>A description of each parameter follows:</p> |
| 220 | |
| 221 | <dd> |
| 222 | </dd> |
| 223 | |
| 224 | <dd> </dd> |
| 225 | <dl class="dl-horizontal"> |
| 226 | <dt>image_info</dt> |
| 227 | <dd>the image info. </dd> |
| 228 | |
| 229 | <dd> </dd> |
| 230 | <dt>images</dt> |
| 231 | <dd>the image list. </dd> |
| 232 | |
| 233 | <dd> </dd> |
| 234 | <dt>length</dt> |
| 235 | <dd>return the actual length of the blob. </dd> |
| 236 | |
| 237 | <dd> </dd> |
| 238 | <dt>exception</dt> |
| 239 | <dd>return any errors or warnings in this structure. </dd> |
| 240 | |
| 241 | <dd> </dd> |
| 242 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 243 | <h2><a href="http://www.imagemagick.org/api/MagickCore/blob_8c.html" id="InjectImageBlob">InjectImageBlob</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 244 | |
| 245 | <p>InjectImageBlob() injects the image with a copy of itself in the specified format (e.g. inject JPEG into a PDF image).</p> |
| 246 | |
| 247 | <p>The format of the InjectImageBlob method is:</p> |
| 248 | |
| 249 | <pre class="text"> |
| 250 | MagickBooleanType InjectImageBlob(const ImageInfo *image_info, |
| 251 | Image *image,Image *inject_image,const char *format, |
| 252 | ExceptionInfo *exception) |
| 253 | </pre> |
| 254 | |
| 255 | <p>A description of each parameter follows:</p> |
| 256 | |
| 257 | <dd> |
| 258 | </dd> |
| 259 | |
| 260 | <dd> </dd> |
| 261 | <dl class="dl-horizontal"> |
| 262 | <dt>image_info</dt> |
| 263 | <dd>the image info.. </dd> |
| 264 | |
| 265 | <dd> </dd> |
| 266 | <dt>image</dt> |
| 267 | <dd>the image. </dd> |
| 268 | |
| 269 | <dd> </dd> |
| 270 | <dt>inject_image</dt> |
| 271 | <dd>inject into the image stream. </dd> |
| 272 | |
| 273 | <dd> </dd> |
| 274 | <dt>format</dt> |
| 275 | <dd>the image format. </dd> |
| 276 | |
| 277 | <dd> </dd> |
| 278 | <dt>exception</dt> |
| 279 | <dd>return any errors or warnings in this structure. </dd> |
| 280 | |
| 281 | <dd> </dd> |
| 282 | </dl> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 283 | </div> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 284 | <footer class="magick-footer"> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 285 | <p><a href="../support.html">Donate</a> • |
| 286 | <a href="../sitemap.html">Sitemap</a> • |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 287 | <a href="../links.html">Related</a> • |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 288 | <a href="../architecture.html">Architecture</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 289 | </p> |
| 290 | <p><a href="blob.html#">Back to top</a> • |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 291 | <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 292 | <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p> |
Cristy | ce4a355 | 2015-12-14 13:53:35 -0500 | [diff] [blame] | 293 | <p><small>© 1999-2015 ImageMagick Studio LLC</small></p> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 294 | </footer> |
| 295 | </div><!-- /.container --> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 296 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 297 | <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 298 | <script src="http://nextgen.imagemagick.org/js/magick.html"></script> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame] | 299 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 300 | </body> |
cristy | 5a367e4 | 2015-05-05 12:39:18 +0000 | [diff] [blame] | 301 | </html> |