Lines Matching +full:- +full:- +full:enable +full:- +full:hdri
8 <meta charset="utf-8" />
9 …<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no…
11 <meta name="application-name" content="ImageMagick" />
13 <meta name="application-url" content="https://imagemagick.org" />
20 <meta name="revisit-after" content="2 DAYS" />
21 <meta name="resource-type" content="document" />
22 <meta name="copyright" content="Copyright (c) 1999-2019 ImageMagick Studio LLC" />
24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
33 <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
34 …<a class="navbar-brand" href="../index.html"><img class="d-block" id="icon" alt="ImageMagick" widt…
35 …ss="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-control…
36 <span class="navbar-toggler-icon"></span>
39 <div class="navbar-collapse collapse" id="navbarsMagick" style="">
40 <ul class="navbar-nav mr-auto">
41 <li class="nav-item ">
42 <a class="nav-link" href="../index.html">Home <span class="sr-only">(current)</span></a>
44 <li class="nav-item ">
45 <a class="nav-link" href="download.html">Download</a>
47 <li class="nav-item ">
48 <a class="nav-link" href="command-line-tools.html">Tools</a>
50 <li class="nav-item ">
51 <a class="nav-link" href="command-line-processing.html">Command-line</a>
53 <li class="nav-item ">
54 <a class="nav-link" href="resources.html">Resources</a>
56 <li class="nav-item ">
57 <a class="nav-link" href="develop.html">Develop</a>
59 <li class="nav-item">
60 … <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a>
63 <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php">
64 … <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
65 <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
72 data-ad-client="ca-pub-3129977114552745"
73 data-ad-slot="6345125851"
74 data-ad-format="auto"></ins>
82 <div class="magick-template">
83 <div class="magick-header">
84 …-center"><a href="architecture.html#cache">The Pixel Cache</a> • <a href="architecture.html#stream…
86 <p class="lead magick-description">The citizens of Oz were quite content with their benefactor, the…
97 <li>orientation (i.e. top-to-bottom, right-to-left, etc.),</li>
108 <li>a few scanlines at once (e.g. pixel rows 4-7)</li>
113 <li>pixels outside the boundaries of the image (e.g. pixel at -1,-3)</li>
114 …<li>a pixel component that is unsigned (65311) or in a floating-point representation (e.g. 0.17836…
115 …<li>a high-dynamic range pixel that can include negative values (e.g. -0.00716) as well as values …
117 …<li>all the pixels in memory to take advantage of speed-ups offered by executing in concert across…
123 …-pixels">authentic pixels</a>) and from any image in a sequence. In addition, the pixel cache pe…
131 …-per-pixel component for the Q8 version of ImageMagick, 16 bits-per-pixel component for the Q16 ve…
138 <dt class="col-md-8">Create an image canvas initialized to the background color:</dt><br/>
139 <dd class="col-md-8"><pre class="highlight"><code>image=AllocateImage(image_info);
142 (void) QueryMagickColor("red",&image->background_color,&image->exception);
146 <dt class="col-md-8">Create an image from a JPEG image on disk:</dt><br/>
147 <dd class="col-md-8"><pre class="highlight"><code>(void) strcpy(image_info->filename,"image.jpg"…
152 <dt class="col-md-8">Create an image from a memory based image:</dt><br/>
153 <dd class="col-md-8"><pre class="highlight"><code>image=BlobToImage(blob_info,blob,extent,exception…
159 <p>In our discussion of the pixel cache, we use the <a href="../www/magick-core.html">MagickCore AP…
161 …-channel 1-bit monochrome PBM image is scaled to 8-bit gray image, if you are using the Q8 version…
163 …entify -version</span><span class='crtout'><br/></span><span class="crtprompt">$ </span><span clas…
164 …f the pixel cache sometimes comes with a trade-off in storage (e.g. storing a 1-bit monochrome ima…
166 <h3><a class="anchor" id="authentic-pixels"></a>Access the Pixel Cache</h3>
168 …ef="architecture.html#authentic-pixels">authentic pixels</a> and outside the region as <a href="ar…
170 …t you do not intend to modify or pixels that lie outside the image region (e.g. pixel @ -1,-3)</li>
176 <p>Here is a typical <a href="../www/magick-core.html">MagickCore</a> code snippet for manipulating…
178 <pre class="pre-scrollable"><code>const Quantum
188 destination=CloneImage(source,source->columns,source->rows,MagickTrue,
192 for (y=0; y < (ssize_t) source->rows; y++)
194 p=GetVirtualPixels(source,0,y,source->columns,1,exception);
195 q=GetAuthenticPixels(destination,0,y,destination->columns,1,exception);
198 for (x=0; x < (ssize_t) source->columns; x++)
200 SetPixelRed(image,90*p->red/100,q);
201 SetPixelGreen(image,90*p->green/100,q);
202 SetPixelBlue(image,90*p->blue/100,q);
203 SetPixelAlpha(image,90*p->opacity/100,q);
210 if (y < (ssize_t) source->rows)
221 for (y=0; y < (ssize_t) source->rows; y++)
223 p=GetVirtualPixels(source,0,y,source->columns,1);
229 if (y < (ssize_t) source->rows)
233 …mage pixels. In some cases the pixels are staged to an intermediate buffer-- and that is why you …
235 <pre class="highlight"><code>p=GetVirtualPixels(source,-3,-3,source->columns+3,6,exception);
240 <h3><a class="anchor" id="virtual-pixels"></a>Virtual Pixels</h3>
243 …od()</a> method from the MagickCore API or the <a href="command-line-options.html#virtual-pixel">&…
246 <dt class="col-md-4">background</dt>
247 <dd class="col-md-8">the area surrounding the image is the background color</dd>
248 <dt class="col-md-4">black</dt>
249 <dd class="col-md-8">the area surrounding the image is black</dd>
250 <dt class="col-md-4">checker-tile</dt>
251 <dd class="col-md-8">alternate squares with image and background color</dd>
252 <dt class="col-md-4">dither</dt>
253 <dd class="col-md-8">non-random 32x32 dithered pattern</dd>
254 <dt class="col-md-4">edge</dt>
255 <dd class="col-md-8">extend the edge pixel toward infinity (default)</dd>
256 <dt class="col-md-4">gray</dt>
257 <dd class="col-md-8">the area surrounding the image is gray</dd>
258 <dt class="col-md-4">horizontal-tile</dt>
259 <dd class="col-md-8">horizontally tile the image, background color above/below</dd>
260 <dt class="col-md-4">horizontal-tile-edge</dt>
261 <dd class="col-md-8">horizontally tile the image and replicate the side edge pixels</dd>
262 <dt class="col-md-4">mirror</dt>
263 <dd class="col-md-8">mirror tile the image</dd>
264 <dt class="col-md-4">random</dt>
265 <dd class="col-md-8">choose a random pixel from the image</dd>
266 <dt class="col-md-4">tile</dt>
267 <dd class="col-md-8">tile the image</dd>
268 <dt class="col-md-4">transparent</dt>
269 <dd class="col-md-8">the area surrounding the image is transparent blackness</dd>
270 <dt class="col-md-4">vertical-tile</dt>
271 <dd class="col-md-8">vertically tile the image, sides are background color</dd>
272 <dt class="col-md-4">vertical-tile-edge</dt>
273 <dd class="col-md-8">vertically tile the image and replicate the side edge pixels</dd>
274 <dt class="col-md-4">white</dt>
275 <dd class="col-md-8">the area surrounding the image is white</dd>
281 …-HDRI Q16 version of ImageMagick, the pixel cache consumes image <var>width * height * bit-depth /…
284 <dt class="col-md-4">width</dt>
285 …<dd class="col-md-8">maximum width of an image. Exceed this limit and an exception is thrown and …
286 <dt class="col-md-4">height</dt>
287 …<dd class="col-md-8">maximum height of an image. Exceed this limit and an exception is thrown and…
288 <dt class="col-md-4">area</dt>
289 …-md-8">maximum area in bytes of any one image that can reside in the pixel cache memory. If this …
290 <dt class="col-md-4">memory</dt>
291 …<dd class="col-md-8">maximum amount of memory in bytes to allocate for the pixel cache from the he…
292 <dt class="col-md-4">map</dt>
293 <dd class="col-md-8">maximum amount of memory map in bytes to allocate for the pixel cache.</dd>
294 <dt class="col-md-4">disk</dt>
295 …<dd class="col-md-8">maximum amount of disk space in bytes permitted for use by the pixel cache. …
296 <dt class="col-md-4">files</dt>
297 …<dd class="col-md-8">maximum number of open pixel cache files. When this limit is exceeded, any s…
298 <dt class="col-md-4">thread</dt>
299 <dd class="col-md-8">maximum number of threads that are permitted to run in parallel.</dd>
300 <dt class="col-md-4">time</dt>
301 …<dd class="col-md-8">maximum number of seconds that the process is permitted to execute. Exceed t…
307 <pre class="highlight">-> identify -list resource
321 …-policy.html">security policy</a> (see <a href="https://imagemagick.org/source/policy.xml">policy.…
323 <policy domain="resource" name="temporary-path" value="/tmp"/>
335 …<policy domain="cache" name="shared-secret" value="replace with your secret phrase" stealth="tr…
337 <policy domain="path" rights="none" pattern="@*"/> <!-- indirect reads not permitted -->
340 …-away processing tasks. If any one image has a width or height that exceeds 8192 pixels, an except…
344 …by the pixel cache, add the <a href="command-line-options.html#debug">-debug cache</a> option to t…
345 <pre class="highlight">-> convert -debug cache logo: -sharpen 3x2 null:
346 2016-12-17T13:33:42-05:00 0:00.000 0.000u 7.0.0 Cache convert: cache.c/DestroyPixelCache/1275/Cache
348 2016-12-17T13:33:42-05:00 0:00.000 0.000u 7.0.0 Cache convert: cache.c/OpenPixelCache/3834/Cache
350 2016-12-17T13:33:42-05:00 0:00.010 0.000u 7.0.0 Cache convert: cache.c/OpenPixelCache/3834/Cache
352 2016-12-17T13:33:42-05:00 0:00.010 0.000u 7.0.0 Cache convert: cache.c/ClonePixelCachePixels/1044/C…
354 2016-12-17T13:33:42-05:00 0:00.020 0.010u 7.0.0 Cache convert: cache.c/ClonePixelCachePixels/1044/C…
356 2016-12-17T13:33:42-05:00 0:00.020 0.010u 7.0.0 Cache convert: cache.c/OpenPixelCache/3834/Cache
358 2016-12-17T13:33:42-05:00 0:00.050 0.100u 7.0.0 Cache convert: cache.c/DestroyPixelCache/1275/Cache
360 2016-12-17T13:33:42-05:00 0:00.050 0.100u 7.0.0 Cache convert: cache.c/DestroyPixelCache/1275/Cache
368 <pre class="highlight"><code>convert -distribute-cache 6668 & // start on 192.168.100.50
369 convert -define registry:cache:hosts=192.168.100.50:6668 myimage.jpg -sharpen 5x2 mimage.png
374 …eously in the pixel cache as you require. The cache view <a href="api/cache-view.html">methods</a…
375 <pre class="pre-scrollable"><code>CacheView
381 for (y=0; y < (ssize_t) source->rows; y++)
383 u=GetCacheViewVirtualPixels(view_1,0,y,source->columns,1,exception);
384 v=GetCacheViewVirtualPixels(view_2,0,source->rows-y-1,source->columns,1,exception);
387 for (x=0; x < (ssize_t) source->columns; x++)
394 if (y < (ssize_t) source->rows)
401 …write-once, read-many-times pattern. For example, your workflow requires extracting random blocks…
413 …cAuthenticPixels() are slightly more efficient than their cache view counter-parts. However, cach…
421 …-range imaging (HDRI), however, permits a far greater dynamic range of exposures (i.e. a large dif…
424 <pre class="highlight"><code>convert -limit memory 2GB -limit map 4GB -define registry:temporary-pa…
429 …ame image many times, consider the MPC format. Reading a MPC image has near-zero overhead because…
431 convert image.mpc -crop 100x100+0+0 +repage 1.png
432 convert image.mpc -crop 100x100+100+0 +repage 2.png
433 convert image.mpc -crop 100x100+200+0 +repage 3.png
443 <pre class="pre-scrollable"><code>static size_t StreamPixels(const Image *image,const void *pixels,…
451 my_data=(MyData *) image->client_data;
463 image_info->client_data=(void *) MyData;
472 …highlight"><code>(void) printf("image width: %lu, height: %lu\n",image->columns,image->rows);
500 <h2><a class="anchor" id="tera-pixel"></a>Large Image Support</h2>
501 … mega-, giga-, or tera-pixel image sizes. An image width or height can range from 1 to 2 giga-pix…
502 <pre class="highlight"><code>convert logo: -resize 250000x250000 logo.miff
506 <pre class="highlight"><code>convert -define registry:temporary-path=/data/tmp logo: \ <br/> -…
509 … not consume all the memory on your system, force the image pixels to memory-mapped disk with reso…
510 <pre class="highlight"><code>convert -define registry:temporary-path=/data/tmp -limit memory 16mb \
511 logo: -resize 250000x250000 logo.miff
515 <pre class="highlight"><code>convert -define registry:temporary-path=/data/tmp -limit area 0 \
516 logo: -resize 250000x250000 logo.miff
520 <pre class="highlight"><code>convert -monitor -limit memory 2GiB -limit map 4GiB -define registry:t…
521 logo: -resize 250000x250000 logo.miff
525 <pre class="highlight"><code>convert -distribute-cache 6668 & // start on 192.168.100.50
526 convert -distribute-cache 6668 & // start on 192.168.100.51
527 convert -limit memory 2mb -limit map 2mb -limit disk 2gb \
528 -define registry:cache:hosts=192.168.100.50:6668,192.168.100.51:6668 \
529 myhugeimage.jpg -sharpen 5x2 myhugeimage.png
531 <p>Due to network latency, expect a substantial slow-down in processing your workflow.</p>
535 …-ups offered by the multicore processor chips. However, you are welcome to use ImageMagick algorit…
538 <pre class="pre-scrollable"><code>CacheView
550 for (y=0; y < (ssize_t) image->rows; y++)
563 q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception);
570 for (x=0; x < (ssize_t) image->columns; x++)
589 <pre class="pre-scrollable"><code>#include "Magick++.h"
599 assert(bmp_info->biCompression == BI_RGB);
600 assert(bmp_info->biWidth == image->columns());
601 assert(abs(bmp_info->biHeight) == image->rows());
602 image->modifyImage();
603 if (bmp_info->biBitCount == 24)
604 image->type(MagickCore::TrueColorType);
606 image->type(MagickCore::TrueColorMatteType);
607 register unsigned int bytes_per_row=bmp_info->biWidth*bmp_info->biBitCount/8;
609 bytes_per_row=bytes_per_row+(4-bytes_per_row % 4); // divisible by 4.
615 for (int y=0; y < int(image->rows()); y++)
626 row=(bmp_info->biHeight > 0) ? (image->rows()-y-1) : y;
628 q=image->setPixels(0,y,image->columns(),1);
629 for (int x=0; x < int(image->columns()); x++)
634 if (bmp_info->biBitCount == 32) {
638 p+=bmp_info->biBitCount/8;
640 image->syncPixels(); // sync pixels to pixel cache.
645 <p>If you call the ImageMagick API from your OpenMP-enabled application and you intend to dynamical…
647 …-view.html">MagickWand</a> supports wand views. A view iterates over the entire, or portion, of t…
657 … may need to disable OpenMP support within ImageMagick. Add the <code>--disable-openmp</code> opt…
660 …ns that are executing concurrently with ImageMagick, or the particular image-processing algorithm …
661 <pre class="highlight">-> convert -bench 10 model.png -sharpen 5x2 null:
676 …>MAGICK_THREAD_LIMIT</a> environment variable, <a href="command-line-options.html#limit">-limit</a…
679 …ting of CPUs, GPUs, and other processors. Depending on your platform, speed-ups can be an order o…
682 <pre class="highlight"><code>identify -version
686 <p>If so, run this command to realize a significant speed-up for image convolution:</p>
688 <pre class="highlight"><code>convert image.png -convolve '-1, -1, -1, -1, 9, -1, -1, -1, -1' convol…
691 …lable or if the accelerator fails to respond, ImageMagick reverts to the non-accelerated convoluti…
694 <pre class="pre-scrollable"><code>static inline long ClampToCanvas(const long offset,const ulong ra…
699 return((long) (range-1L));
722 const long mid_width = (width-1)/2;
723 const long mid_height = (height-1)/2;
728 for (long v=(-mid_height); v <= mid_height; v++)
730 for (long u=(-mid_width); u <= mid_width; u++)
734 const float alpha=scale*(QuantumRange-source[index].w);
752 <p>See <a href="https://github.com/ImageMagick/ImageMagick/tree/ImageMagick-7/magick/accelerate.c">…
754 …-end GPUs running the OpenCL filters in ImageMagick, longer execution times might trigger the TDR …
761 <pre class="pre-scrollable"><code>#include <MagickCore/studio.h>
771 #include <MagickCore/pixel-accessor.h>
774 #include "filter/blob-private.h"
775 #include "filter/exception-private.h"
776 #include "filter/image-private.h"
777 #include "filter/monitor-private.h"
778 #include "filter/quantum-private.h"
885 assert(image_info->signature == MagickCoreSignature);
886 if (image_info->debug != MagickFalse)
888 image_info->filename);
890 assert(exception->signature == MagickCoreSignature);
913 image->columns=columns;
914 image->rows=rows;
915 image->depth=8;
916 if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0))
917 if (image->scene >= (image_info->scene+image_info->number_scenes-1))
922 if (SetImageExtent(image,image->columns,image->rows,exception) == MagickFalse)
924 pixels=(unsigned char *) AcquireQuantumMemory((size_t) image->columns,
928 for (y=0; y < (long) image->rows; y++)
930 count=(ssize_t) ReadBlob(image,(size_t) (3*image->columns),pixels);
931 if (count != (ssize_t) (3*image->columns))
934 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
937 for (x=0; x < (long) image->columns; x++)
946 if (image->previous == (Image *) NULL)
947 if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
948 (QuantumTick(y,image->rows) != MagickFalse))
950 status=image->progress_monitor(LoadImageTag,y,image->rows,
951 image->client_data);
960 image->filename);
966 if (image_info->number_scenes != 0)
967 if (image->scene >= (image_info->scene+image_info->number_scenes-1))
984 if (image->progress_monitor != (MagickProgressMonitor) NULL)
1012 % whether the format supports native in-memory I/O, and a brief
1026 entry->decoder=(DecodeImageHandler *) ReadMGKImage;
1027 entry->encoder=(EncodeImageHandler *) WriteMGKImage;
1028 entry->magick=(IsImageFormatHandler *) IsMGK;
1116 assert(image_info->signature == MagickCoreSignature);
1118 assert(image->signature == MagickCoreSignature);
1119 if (image->debug != MagickFalse)
1120 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
1130 if (image->colorspace != RGBColorspace)
1132 pixels=(unsigned char *) AcquireQuantumMemory((size_t) image->columns,
1140 (void) FormatLocaleString(buffer,MaxTextExtent,"%lu %lu\n",image->columns,
1141 image->rows);
1143 for (y=0; y < (long) image->rows; y++)
1145 p=GetVirtualPixels(image,0,y,image->columns,1,exception);
1149 for (x=0; x < (long) image->columns; x++)
1156 (void) WriteBlob(image,(size_t) (q-pixels),pixels);
1157 if (image->previous == (Image *) NULL)
1158 if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
1159 (QuantumTick(y,image->rows) != MagickFalse))
1161 status=image->progress_monitor(SaveImageTag,y,image->rows,
1162 image->client_data);
1176 } while (image_info->adjoin != MagickFalse);
1190 …ey are invoked from the command line with the <a href="command-line-options.html#process">-process…
1192 …putes a few statistics such as the pixel brightness and saturation mean and standard-deviation.</p>
1193 <pre class="pre-scrollable"><code>#include <stdio.h>
1260 delta=max-min;
1265 if (fabs(red-max) < MagickEpsilon)
1266 *hue=(green-blue)/delta;
1268 if (fabs(green-max) < MagickEpsilon)
1269 *hue=2.0+(blue-red)/delta;
1271 *hue=4.0+(red-green)/delta;
1310 assert((*images)->signature == MagickCoreSignature);
1344 for (y=0; y < (long) image->rows; y++)
1354 p=GetCacheViewVirtualPixels(image_view,0,y,image->columns,1,exception);
1360 for (x=0; x < (long) image->columns; x++)
1384 brightness_standard_deviation=sqrt(brightness_sum_x2/area-(brightness_sum_x/
1388 (void) SetImageProperty(image,"filter:brightness:standard-deviation",text,
1391 brightness_kurtosis=(brightness_sum_x4/area-4.0*brightness_mean*
1393 brightness_sum_x2/area-3.0*brightness_mean*brightness_mean*
1396 brightness_standard_deviation)-3.0;
1401 brightness_skewness=(brightness_sum_x3/area-3.0*brightness_mean*
1410 saturation_standard_deviation=sqrt(saturation_sum_x2/area-(saturation_sum_x/
1414 (void) SetImageProperty(image,"filter:saturation:standard-deviation",text,
1417 saturation_kurtosis=(saturation_sum_x4/area-4.0*saturation_mean*
1419 saturation_sum_x2/area-3.0*saturation_mean*saturation_mean*
1422 saturation_standard_deviation)-3.0;
1426 saturation_skewness=(saturation_sum_x3/area-3.0*saturation_mean*
1439 <pre class="highlight"><code>convert logo: -process \"analyze\" -verbose info:
1447 filter:brightness:skewness: -2.97118
1448 filter:brightness:standard-deviation: 13742.1
1452 filter:saturation:standard-deviation: 15575.9
1460 </main><!-- /.container -->
1461 <footer class="magick-footer">
1462 <p><a href="security-policy.html">Security</a> •
1467 …<a href="architecture.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width…
1473 <small>© 1999-2019 ImageMagick Studio LLC</small></p>
1476 <!-- Javascript assets -->
1481 <!-- Magick Cache 5th January 2019 11:42 -->