-
Notifications
You must be signed in to change notification settings - Fork 138
/
image2.html
3075 lines (2117 loc) · 76.7 KB
/
image2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1st December 2004), see www.w3.org" />
<title>RMagick 0.0.0: class Image (instance methods, part
2)</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<meta name="GENERATOR" content="Quanta Plus" />
<meta name="Copyright" content=
"Copyright (C) 2006 by Timothy P. Hunter" />
<link rel="stylesheet" type="text/css" href="css/doc.css" />
<script type="text/javascript" src="scripts/doc.js">
</script>
<script type="text/javascript" src="scripts/stripeTables.js">
</script>
<script type="text/javascript">
//<![CDATA[
addLoadEvent(stripeTables);
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
<!-- Pre-load this image so that the browser knows how big it is. -->
<!-- Begin
flower_hat = new Image();
flower_hat.src = "ex/images/Flower_Hat.jpg";
// End -->
//]]>
</script>
<style type="text/css">
/*<![CDATA[*/
#iptc {
border: thin solid black;
}
#iptc th {
background-color: #c0c0c0;
}
td.ds {
text-align: right;
}
/*]]>*/
</style>
</head>
<body>
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
<div class="nav">
« <a href="image1.html">Prev</a> | <a href=
"index.html">Contents</a> | <a href=
"image3.html">Next</a> »
</div>
<h1>class Image <span class="superclass">< Object</span>
(class and instance methods, part 2)<br />
<span class="mixin">mixes in Comparable</span></h1>
<div id="toc">
<h2>Table of Contents</h2>
<h3>instance methods</h3>
<div>
<div class="toccol">
<ul>
<li><a href="#enhance">enhance</a></li>
<li><a href="#equalize">equalize</a></li>
<li><a href="#erase_bang">erase!</a></li>
<li><a href="#export_pixels">export_pixels</a></li>
<li><a href=
"#export_pixels_to_str">export_pixels_to_str</a></li>
<li><a href=
"#find_similar_region">find_similar_region</a></li>
<li><a href="#flip">flip</a></li>
<li><a href="#flip_bang">flip!</a></li>
<li><a href="#flop">flop</a></li>
<li><a href="#flop_bang">flop!</a></li>
<li><a href="#frame">frame</a></li>
<li><a href="#freeze">freeze</a></li>
<li><a href="#gamma_channel">gamma_channel</a></li>
<li><a href="#gamma_correct">gamma_correct</a></li>
<li><a href="#gaussian_blur">gaussian_blur</a></li>
<li><a href=
"#gaussian_blur_channel">gaussian_blur_channel</a></li>
<li><a href=
"#get_exif_by_entry">get_exif_by_entry</a></li>
<li><a href=
"#get_exif_by_number">get_exif_by_number</a></li>
</ul>
</div>
<div class="toccol">
<ul>
<li><a href="#get_iptc_dataset">get_iptc_dataset</a></li>
<li><a href="#get_pixels">get_pixels</a></li>
<li><a href="#gray_q">gray?</a></li>
<li><a href="#grey_q">grey?</a></li>
<li><a href="#implode">implode</a></li>
<li><a href="#import_pixels">import_pixels</a></li>
<li><a href="#inspect">inspect</a></li>
<li><a href="#level">level</a></li>
<li><a href="#level_channel">level_channel</a></li>
<li><a href="#linear_stretch">linear_stretch</a></li>
<li><a href="#magnify">magnify</a></li>
<li><a href="#magnify_bang">magnify!</a></li>
<li><a href="#map">map</a></li>
<li><a href=
"#matte_fill_to_border">matte_fill_to_border</a></li>
<li><a href="#matte_floodfill">matte_floodfill</a></li>
<li><a href="#matte_point">matte_point</a></li>
<li><a href="#matte_replace">matte_replace</a></li>
<li><a href="#matte_reset_bang">matte_reset!</a></li>
</ul>
</div>
<div class="toccol">
<ul>
<li><a href="#median_filter">median_filter</a></li>
<li><a href="#minify">minify</a></li>
<li><a href="#minify_bang">minify!</a></li>
<li><a href="#modulate">modulate</a></li>
<li><a href="#monochrome_q">monochrome?</a></li>
<li><a href="#motion_blur">motion_blur</a></li>
<li><a href="#negate">negate</a></li>
<li><a href="#negate_channel">negate_channel</a></li>
<li><a href="#normalize">normalize</a></li>
<li><a href=
"#normalize_channel">normalize_channel</a></li>
<li><a href="#oil_paint">oil_paint</a></li>
<li><a href="#opaque">opaque</a></li>
<li><a href="#opaque_q">opaque?</a></li>
<li><a href="#ordered_dither">ordered_dither</a></li>
<li><a href="#palette_q">palette?</a></li>
<li><a href="#pixel_color">pixel_color</a></li>
<li><a href="#polaroid">polaroid</a></li>
<li><a href="#posterize">posterize</a></li>
</ul>
</div>
</div>
</div>
<h2 class="methods">instance methods</h2>
<div class="sig">
<h3 id="enhance">enhance</h3>
<p><span class="arg">image</span>.enhance ->
<em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">Applies a digital filter that improves the
quality of a noisy image.</p>
<h4>Returns</h4>
<p>A new image</p>
<h4>Example</h4>
<p>The left-hand side has had noise added by <code><a href=
"#add_noise">add_noise</a></code>. The right-hand side is the
result after using <code>enhance</code>.</p>
<p><a href="javascript:popup('enhance.rb.html')"><img src=
"ex/enhance.jpg" alt="enhance example" title=
"Click to see the example script" /></a></p>
<h4>See also</h4>
<p><a href="image2.html#median_filter">median_filter</a>,
<a href="image2.html#reduce_noise">reduce_noise</a>, <a href=
"image3.html#unsharp_mask">unsharp_mask</a></p>
<h4>Magick API</h4>
<p>EnhanceImage</p>
</div>
<div class="sig">
<h3 id="equalize">equalize</h3>
<p><span class="arg">image</span>.equalize ->
<em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">Applies a histogram equalization to the
image.</p>
<h4>Returns</h4>
<p>A new image</p>
<h4>Example</h4>
<p class="rollover"><a href=
"javascript:popup('equalize.rb.html')"><img onmouseover=
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
"this.src='ex/equalize.jpg'" src="ex/equalize.jpg" alt=
"equalize example" title=
"Click to see the example script" /></a> <img src=
"ex/images/spin.gif" alt="" class="spin" title=
"Mouse over the example to see the original image" /></p>
<h4>Magick API</h4>
<p>EqualizeImage</p>
</div>
<div class="sig">
<h3 id="erase_bang">erase!</h3>
<p><span class="arg">image</span>.erase! ->
<em>image</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Sets the entire image to the <a href=
"imageattrs.html#background_color">background color</a>.</p>
<h4>Returns</h4>self
<h4>See also</h4>
<p><a href="image1.html#color_reset_bang">color_reset!</a></p>
<h4>Magick API</h4>
<p>SetImage</p>
</div>
<div class="sig">
<h3 id="export_pixels">export_pixels</h3>
<p><span class="arg">image</span>.export_pixels(<span class=
"arg">x</span>=0, <span class="arg">y</span>=0, <span class=
"arg">columns</span>=<span class="arg">image</span>.columns,
<span class="arg">rows</span>=<span class=
"arg">image</span>.rows, <span class="arg">map</span>="RGB")
-> <em>anArray</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Extracts the pixel data from the specified rectangle and
returns it as an array of <code>Integer</code> values.</p>
<p>The array returned by <code>export_pixels</code> is suitable
for use as an argument to <code>import_pixels</code>.</p>
<h4>Arguments</h4>
<dl>
<dt>x, y</dt>
<dd>The offset of the rectangle from the upper-left corner of
the image.</dd>
<dt>columns, rows</dt>
<dd>The width and height of the rectangle.</dd>
<dt>map</dt>
<dd>A string that describes which pixel channel data is
desired and the order in which it should be stored.
<span class="imquote">It can be any combination or order of R
= red, G = green, B = blue, A = alpha, C = cyan, Y = yellow,
M = magenta, K = black, I = intensity (for grayscale), or P =
pad.</span></dd>
</dl>
<h4>Returns</h4>An array
<h4>Example</h4>
<pre>
# Export the r'th scanline from an image in red-green-blue order
scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
</pre>
<h4>See also</h4>
<p><a href="image1.html#dispatch">dispatch</a>, <a href=
"#export_pixels_to_str">export_pixels_to_str</a>, <a href=
"#import_pixels">import_pixels</a>, <a href=
"#get_pixels">get_pixels</a></p>
<h4>Magick API</h4>
<p>ExportImagePixels</p>
<h4>Note</h4>
<p>This method replaces the <code>dispatch</code> method.</p>
</div>
<div class="sig">
<h3 id="export_pixels_to_str">export_pixels_to_str</h3>
<p><span class=
"arg">image</span>.export_pixels_to_str(<span class=
"arg">x</span>=0, <span class="arg">y</span>=0, <span class=
"arg">columns</span>=<span class="arg">image</span>.columns,
<span class="arg">rows</span>=<span class=
"arg">image</span>.rows, <span class="arg">map</span>="RGB",
<span class="arg">type</span>=<code>Magick::CharPixel</code>)
-> <em>aString</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Extracts the pixel data from the specified rectangle and
returns it as a string. If you need to get the pixel data in a
memory buffer (as input to another application, for example),
this method is much, much faster than <a href=
"#export_pixels">export_pixels</a> or <a href=
"#get_pixels">get_pixels</a>.</p>
<p>The string returned by <code>export_pixels_to_str</code> is
suitable for use as an argument to
<code>import_pixels</code>.</p>
<p><strong>Note:</strong> You can also use <a href=
"image3.html#to_blob">to_blob</a> to convert an image into a
string.</p>
<h4>Arguments</h4>
<dl>
<dt>x, y</dt>
<dd>The offset of the rectangle from the upper-left corner of
the image.</dd>
<dt>columns, rows</dt>
<dd>The width and height of the rectangle.</dd>
<dt>map</dt>
<dd>A string that describes which pixel channel data is
desired and the order in which it should be stored.
<span class="imquote">It can be any combination or order of R
= red, G = green, B = blue, A = alpha, C = cyan, Y = yellow,
M = magenta, K = black, I = intensity (for grayscale), or P =
pad.</span></dd>
<dt>type</dt>
<dd>A <a href="constants.html#StorageType">StorageType</a>
value that specifies the C datatype to which the pixel data
will be converted. The default is <code>CharPixel</code>,
which means that the pixel values will be stored as C
<code>unsigned char</code>s.</dd>
</dl>
<h4>Returns</h4>A string
<h4>See also</h4>
<p><a href="image1.html#dispatch">dispatch</a>, <a href=
"#export_pixels">export_pixels</a>, <a href=
"#import_pixels">import_pixels</a>, <a href=
"#get_pixels">get_pixels</a></p>
<h4>Magick API</h4>
<p>ExportImagePixels</p>
</div>
<div class="sig">
<h3 id="find_similar_region">find_similar_region</h3>
<p><span class=
"arg">image</span>.find_similar_region(<span class=
"arg">target</span>, <span class="arg">x</span>=0, <span class=
"arg">y</span>=0) -> <em>[rx, ry]</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>This interesting method searches for a rectangle in the
image that is <em>similar</em> to the target. For the rectangle
to be <em>similar</em> each pixel in the rectangle must match
the corresponding pixel in the target image within the range
specified by the <code>fuzz</code> attributes of the image and
the target image.</p>
<h4>Arguments</h4>
<dl>
<dt>target</dt>
<dd>An image that forms the target of the search. This image
can be any size.</dd>
<dt>x, y</dt>
<dd>The starting <em>x-</em> and <em>y-</em>offsets for the
search. If omitted both <span class="arg">x</span> and
<span class="arg">y</span> default to 0.</dd>
</dl>
<h4>Returns</h4>
<p>If the search succeeds, the return value is an array with 2
elements. These elements are the <em>x-</em> and
<em>y-</em>offsets of the matching rectangle. If the search
fails the return value is <code>nil</code>.</p>
<h4>Magick API</h4>
<p>IsImageSimilar (available in ImageMagick 6.2.8)</p>
</div>
<div class="sig">
<h3 id="flip">flip</h3>
<p><span class="arg">image</span>.flip ->
<em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Create a vertical mirror image of the receiver.</p>
<h4>Returns</h4>
<p>A new image</p>
<h4>Example</h4>
<p class="rollover"><a href=
"javascript:popup('flip.rb.html')"><img onmouseover=
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
"this.src='ex/flip.jpg'" src="ex/flip.jpg" alt="flip example"
title="Click to see the example script" /></a> <img src=
"ex/images/spin.gif" alt="" class="spin" title=
"Mouse over the example to see the original image" /></p>
<h4>See also</h4>
<p><a href="image1.html#affine_transform">affine_transform</a>,
<a href="#flip_bang">flip!</a>, <a href="#flop">flop</a>,
<a href="image3.html#rotate">rotate</a>, <a href=
"image3.html#transpose">transpose</a>, <a href=
"image3.html#transverse">transverse</a></p>
<h4>Magick API</h4>
<p>FlipImage</p>
</div>
<div class="sig">
<h3 id="flip_bang">flip!</h3>
<p><span class="arg">image</span>.flip! ->
<em>image</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>In-place form of <a href="image1.html#flip">flip</a>.</p>
<h4>Returns</h4>
<p>self</p>
</div>
<div class="sig">
<h3 id="flop">flop</h3>
<p><span class="arg">image</span>.flop ->
<em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Create a horizontal mirror image of the receiver.</p>
<h4>Returns</h4>
<p>A new image</p>
<h4>Example</h4>
<p class="rollover"><a href=
"javascript:popup('flop.rb.html')"><img onmouseover=
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
"this.src='ex/flop.jpg'" src="ex/flop.jpg" alt="flop example"
title="Click to see the example script" /></a> <img src=
"ex/images/spin.gif" alt="" class="spin" title=
"Mouse over the example to see the original image" /></p>
<h4>See also</h4>
<p><a href="image1.html#affine_transform">affine_transform</a>,
<a href="#flip">flip</a>, <a href="#flop_bang">flop!</a>,
<a href="image3.html#rotate">rotate</a>, <a href=
"image3.html#transpose">transpose</a>, <a href=
"image3.html#transverse">transverse</a></p>
<h4>Magick API</h4>
<p>FlopImage</p>
</div>
<div class="sig">
<h3 id="flop_bang">flop!</h3>
<p><span class="arg">image</span>.flop! ->
<em>image</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>In-place form of <a href="image1.html#flop">flop</a>.</p>
<h4>Returns</h4>
<p>self</p>
</div>
<div class="sig">
<h3 id="frame">frame</h3>
<p><span class="arg">image</span>.frame(<span class=
"arg">width</span>=25, <span class="arg">height</span>=25,
<span class="arg">x</span>=25, <span class="arg">y</span>=25,
<span class="arg">inner_bevel</span>=6, <span class=
"arg">outer_bevel</span>=6, <span class=
"arg">color</span>=<code><a href=
"imageattrs.html#matte_color">matte_color</a></code>) ->
<em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Adds a simulated 3D border.</p>
<h4>Arguments</h4>
<dl>
<dt>width</dt>
<dd>The width of the left and right sides.</dd>
<dt>height</dt>
<dd>The height of the top and bottom sides.</dd>
<dt>x, y</dt>
<dd>The image does not have to be centered in the border.
These two arguments specify the offset of the image from the
upper-left outside corner of the border.</dd>
<dt>inner_bevel, outer_bevel</dt>
<dd>The width of the inner and outer shadows of the border.
These values should be much smaller than the width and height
and cannot be greater than 1/2 the lesser of the width or
height.</dd>
<dt>color</dt>
<dd>The border color. By default the color is the <a href=
"imageattrs.html#matte_color">matte color</a>.</dd>
</dl>
<h4>Returns</h4>
<p>A new image</p>
<h4>Example</h4>
<p class="rollover"><a href=
"javascript:popup('frame.rb.html')">
<!-- This img tag displays the original image when the mouse is over -->
<img style="padding:25px; display:none" id="frameless"
onmouseout="this.style.display='none';framed.style.display='';"
src="ex/images/Flower_Hat.jpg" alt="frame example" title=
"Click to see the example script" /><!--
This img tag displays the framed image when the mouse is not over
--><img onmouseover="this.style.display='none';frameless.style.display='';"
src="ex/frame.jpg" alt="frame example" /></a> <img src=
"ex/images/spin.gif" alt="" style="margin-bottom: 280px" title=
"Mouse over the example to see the original image" /></p>
<h4>See also</h4>
<p><a href="image1.html#border">border</a></p>
<h4>Magick API</h4>
<p>FrameImage</p>
</div>
<div class="sig">
<h3 id="freeze">freeze</h3>
<p><span class="arg">image</span>.freeze ->
<em>self</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Prevent further modifications to the image.</p>
<h4>Returns</h4>
<p>self</p>
</div>
<div class="sig">
<h3 id="gamma_channel">gamma_channel</h3>
<p><span class="arg">image</span>.gamma_channel(<span class=
"arg">gamma</span>, [<span class="arg">channel</span>...]) =
<em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">Gamma-correct a particular image channel.
The same image viewed on different devices will have perceptual
differences in the way the image's intensities are represented
on the screen.</p>
<h4>Arguments</h4>
<dl>
<dt>gamma</dt>
<dd class="imquote">Values typically range from 0.8 to 2.3.
You can also reduce the influence of a particular channel
with a gamma value of 0.</dd>
<dt>channel...</dt>
<dd>0 or more <a href=
"constants.html#ChannelType">ChannelType</a> arguments. If no
channels are specified, all the channels are corrected using
the <span class="arg">gamma</span> value.</dd>
</dl>
<h4>Returns</h4>
<p>A new image</p>
<h4>See also</h4>
<p>The older <a href="#gamma_correct">gamma_correct</a> method
is implemented in terms of <code>gamma_channel</code>.</p>
<h4>Magick API</h4>
<p>GammaImageChannel</p>
</div>
<div class="sig">
<h3 id="gamma_correct">gamma_correct</h3>
<p><span class="arg">image</span>.gamma_correct(<span class=
"arg">red_gamma</span>[,<span class="arg">green_gamma</span>[,
<span class="arg">blue_gamma</span>]]) ->
<em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Gamma-correct an image. The same image viewed on different
devices will have perceptual differences in the way the image's
intensities are represented on the screen.</p>
<h4>Arguments</h4>
<p>You must specify at least <code>red_gamma</code>. Omitted
arguments take on the value of the last specified argument.
<span class="imquote">Values typically range from 0.8 to
2.3.</span></p>
<h4>Returns</h4>
<p>A new image</p>
<h4>See also</h4>
<p><a href="#gamma_channel">gamma_channel</a></p>
<h4>Magick API</h4>
<p>GammaImage</p>
</div>
<div class="sig">
<h3 id="gaussian_blur">gaussian_blur</h3>
<p><span class="arg">image</span>.gaussian_blur(<span class=
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
-> <em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">Blurs an image. We convolve the image with a
Gaussian operator of the given radius and standard deviation
(sigma).</p>
<h4>Arguments</h4>
<dl>
<dt>radius</dt>
<dd>A <code>Float</code> value representing <span class=
"imquote">the radius of the Gaussian, in pixels, not counting
the center pixel.</span></dd>
<dt>sigma</dt>
<dd>A <code>Float</code> value representing the standard
deviation of the Gaussian operator, in pixels. This argument
must be > 0.0.</dd>
</dl>
<h4>Returns</h4>
<p>A new image</p>
<h4>Example</h4>
<p><code>gaussian_blur(0.0, 3.0)</code></p>
<p class="rollover"><a href=
"javascript:popup('gaussian_blur.rb.html')"><img onmouseover=
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
"this.src='ex/gaussian_blur.jpg'" src="ex/gaussian_blur.jpg"
alt="gaussian_blur example" title=
"Click to see the example script" /></a> <img src=
"ex/images/spin.gif" alt="" class="spin" title=
"Mouse over the example to see the original image" /></p>
<h4>See also</h4>
<p><a href="image1.html#blur_image">blur_image</a>, <a href=
"#motion_blur">motion_blur</a>, <a href=
"image3.html#radial_blur">radial_blur</a></p>
<h4>Magick API</h4>
<p>GaussianBlurImage</p>
</div>
<div class="sig">
<h3 id="gaussian_blur_channel">gaussian_blur_channel</h3>
<p><span class=
"arg">image</span>.gaussian_blur_channel(<span class=
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0[,
<span class="arg">channel</span>...]) ->
<em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Blurs the selected channel or channels using a Gaussian
operator of the specified radius and standard deviation.</p>
<h4>Arguments</h4>
<dl>
<dt>radius</dt>
<dd>A <code>Float</code> value representing <span class=
"imquote">the radius of the Gaussian, in pixels, not counting
the center pixel.</span></dd>
<dt>sigma</dt>
<dd>A <code>Float</code> value representing the standard
deviation of the Gaussian operator, in pixels. This argument
must be > 0.0.</dd>
<dt>channel...</dt>
<dd>0 or more <a href=
"constants.html#ChannelType">ChannelType</a> arguments. If no
channels are specified, all the channels are blurred. This is
the same as using <a href=
"#gaussian_blur">gaussian_blur</a>.</dd>
</dl>
<h4>Returns</h4>
<p>A new image</p>
<h4>See also</h4>
<p><a href="image1.html#blur_channel">blur_channel</a></p>
<h4>Magick API</h4><p>GaussianBlurImageChannel</p>
</div>
<div class="sig">
<h3 id="get_exif_by_entry">get_exif_by_entry</h3>
<p><span class=
"arg">image</span>.get_exif_by_entry(<span class="arg">[name]*</span>)
-> <em>anArray</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Returns the value associated with the specified EXIF entry
name or names. If no names are specified, returns all the
entries. The return value is an array containing one or more
[name, value] elements.</p>
<h4>Arguments</h4>
<p>Zero or more EXIF entry names.</p>
<h4>Returns</h4>
<p>The elements in the returned array are 2-element arrays in
the form [name, value]. If ×Magick does not know the name
for an entry it uses "unknown." There may be more than one
entry for "unknown" in the returned array. If there is no entry
with the specified name the value is set to
<code>nil</code>.</p>
<h4>Example</h4>
<pre>
image.get_exif_by_entry('Make') » [["Make", "Canon"]]
image.get_exif_by_entry("ShutterSpeedValue") »
[["ShutterSpeedValue", "189/32"]]
image.get_exif_by_entry() »
[["Make", "Canon"], ["ShutterSpeedValue", "189/32"] ...]
</pre>
<h4>See also</h4>
<p><a href="#get_exif_by_number">get_exif_by_number</a></p>
</div>
<div class="sig">
<h3 id="get_exif_by_number">get_exif_by_number</h3>
<p><span class=
"arg">image</span>.get_exif_by_number(<span class=
"arg">[tag]*</span>) -> <em>aHash</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Returns the value associated with the specified EXIF tag
number or numbers. If no numbers are specified, returns all the
tags. The return value is a hash. The hash keys are EXIF tag
numbers. The values are the values associated with the
tags.</p>
<h4>Arguments</h4>
<p>Zero or more EXIF tag numbers.</p>
<h4>Returns</h4>
<p>A hash. If there is no tag with the specified number the
value is set to <code>nil</code>.</p>
<h4>Example</h4>
<pre>
image.get_exif_by_number(271) » {271=>"Canon"}
image.get_exif_by_number(37377) » {37377=>"189/32"}
image.get_exif_by_number() »
{271=>"Canon", 37377=>"189/32" ...}
</pre>
<h4>See also</h4>
<p><a href="#get_exif_by_entry">get_exif_by_entry</a></p>
</div>
<div class="sig">
<h3 id="get_iptc_dataset">get_iptc_dataset</h3>
<p><span class="arg">image</span>.get_iptc_dataset(<span class=
"arg">ds</span>) -> <em>aString</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Retrieves the data field for the specified DataSet, or
<code>nil</code> if the DataSet is not used or the data field
has length 0.</p>
<h4>Arguments</h4>
<p>RMagick defines the following constants for use as arguments
to this method. All the constants are in the Magick::IPTC
namespace. Notice that some DataSets have two names.</p>
<table id="iptc" class="striped" summary=
"IPTC dataset constants">
<tr>
<th>Constant</th>
<th>Record:DataSet</th>
</tr>
<tr>
<td>Envelope::Model_Version</td>
<td class="ds">1:00</td>
</tr>
<tr>
<td>Envelope::Destination</td>
<td class="ds">1:05</td>
</tr>