-
Notifications
You must be signed in to change notification settings - Fork 2
/
imageattrs.html
1528 lines (1046 loc) · 44.9 KB
/
imageattrs.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" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
<title>RMagick 6.0.1: class Image (attribute methods)</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>
<style type="text/css">
/*<![CDATA[*/
/* Styles local to this page. */
/*]]>*/
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>
hljs.configure({ cssSelector: "pre" });
hljs.highlightAll();
</script>
</head>
<body>
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>
<div class="nav">« <a href="ilist.html">Prev</a> | <a href="index.html">Contents</a> | <a href="image1.html">Next</a> »</div>
<h1>
class Image <span class="superclass">< Object</span> (attribute methods)<br />
<span class="mixin">mixes in Comparable</span>
</h1>
<div id="toc">
<h2>Table of Contents</h2>
<h3>attribute methods</h3>
<div>
<div class="toccol">
<ul>
<li><a href="#background_color">background_color</a></li>
<li><a href="#base_columns">base_columns</a></li>
<li><a href="#base_filename">base_filename</a></li>
<li><a href="#base_rows">base_rows</a></li>
<li><a href="#bias">bias</a></li>
<li><a href="#black_point_compensation">black_point_compensation</a></li>
<li><a href="#border_color">border_color</a></li>
<li><a href="#bounding_box">bounding_box</a></li>
<li><a href="#chromaticity">chromaticity</a></li>
<li><a href="#class_type">class_type</a></li>
<li><a href="#color_profile">color_profile</a></li>
<li><a href="#colors">colors</a></li>
<li><a href="#colorspace">colorspace</a></li>
<li><a href="#columns">columns</a></li>
<li><a href="#compose">compose</a></li>
<li><a href="#compression">compression</a></li>
<li><a href="#delay">delay</a></li>
<li><a href="#density">density</a></li>
<li><a href="#depth">depth</a></li>
<li><a href="#directory">directory</a></li>
</ul>
</div>
<div class="toccol">
<ul>
<li><a href="#dispose">dispose</a></li>
<li><a href="#endian">endian</a></li>
<li><a href="#extract_info">extract_info</a></li>
<li><a href="#filename">filename</a></li>
<li><a href="#filesize">filesize</a></li>
<li><a href="#filter">filter</a></li>
<li><a href="#format">format</a></li>
<li><a href="#fuzz">fuzz</a></li>
<li><a href="#gamma">gamma</a></li>
<li><a href="#geometry">geometry</a></li>
<li><a href="#gravity">gravity</a></li>
<li><a href="#image_type">image_type</a></li>
<li><a href="#interlace">interlace</a></li>
<li><a href="#iptc_profile">iptc_profile</a></li>
<li><a href="#matte_color">matte_color</a></li>
<li><a href="#mean_error_per_pixel">mean_error_per_pixel</a></li>
<li><a href="#mime_type">mime_type</a></li>
<li><a href="#montage">montage</a></li>
<li><a href="#normalized_mean_error">normalized_mean_error</a></li>
<li>
<a href="#normalized_maximum_error">normalized_maximum_error</a>
</li>
</ul>
</div>
<div class="toccol">
<ul>
<li><a href="#number_colors">number_colors</a></li>
<li><a href="#offset">offset</a></li>
<li><a href="#orientation">orientation</a></li>
<li><a href="#page">page</a></li>
<li><a href="#pixel_interpolation_method">pixel_interpolation_method</a></li>
<li><a href="#quality">quality</a></li>
<li><a href="#quantum_depth">quantum_depth</a></li>
<li><a href="#rendering_intent">rendering_intent</a></li>
<li><a href="#rows">rows</a></li>
<li><a href="#scene">scene</a></li>
<li><a href="#start_loop">start_loop</a></li>
<li><a href="#ticks_per_second">ticks_per_second</a></li>
<li><a href="#total_colors">total_colors</a></li>
<li><a href="#total_ink_density">total_ink_density</a></li>
<li><a href="#transparent_color">transparent_color</a></li>
<li><a href="#units">units</a></li>
<li><a href="#virtual_pixel_method">virtual_pixel_method</a></li>
<li><a href="#x_resolution">x_resolution</a></li>
<li><a href="#y_resolution">y_resolution</a></li>
</ul>
</div>
</div>
</div>
<h2 class="methods">attribute methods</h2>
<div class="sig">
<h3 id="background_color">background_color</h3>
<p>
<span class="arg">img.</span>background_color -> <em>string</em><br />
<span class="arg">img</span>.background_color = <span class="arg">string</span> or <span class="arg">pixel</span> -> <em>string</em> or
<em>pixel</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The image's background color. By default the background color is "white".</p>
<h4>Argument</h4>
<p>Either a <a href="imusage.html#color_names">color name</a> or a <a href="struct.html#Pixel">Pixel</a> object.</p>
<h4>Returns</h4>
<p>A color name or <a href="struct.html#Pixel">Pixel</a> object.</p>
</div>
<div class="sig">
<h3 id="base_columns">base_columns</h3>
<p><span class="arg">img.</span>base_columns -> <em>integer</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The number of columns in the image before any transformations. Get-only.</p>
</div>
<div class="sig">
<h3 id="base_filename">base_filename</h3>
<p><span class="arg">img</span>.base_filename -> <em>string</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The image's original filename before any transformations. Get-only.</p>
</div>
<div class="sig">
<h3 id="base_rows">base_rows</h3>
<p><span class="arg">img.</span>base_rows -> <em>integer</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The number of rows in the image before any transformations. Get-only.</p>
</div>
<div class="sig">
<h3 id="bias">bias</h3>
<p>
<span class="arg">img</span>.bias -> <em>float</em><br />
<span class="arg">img</span>.bias = <span class="arg">float</span> or <span class="arg">string</span> -> <em>float</em> or <em>string</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">Add bias when convolving an image</p>
<h4>Argument</h4>
<p>Either a number between 0.0 and 1.0 or a string in the form "NN%".</p>
</div>
<div class="sig">
<h3 id="black_point_compensation">black_point_compensation</h3>
<p>
<span class="arg">img</span>.black_point_compensation -> <code>true</code> or <code>false</code><br />
<span class="arg">img</span>.black_point_compensation = <code>true</code> or <code>false</code> -> <em>true</em> or <em>false</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
Use black point compensation. Typically used in CMYK-to-RGB conversion along with <code>image.</code>
<a href="#rendering_intent">rendering_intent</a>=<a href="constants.html#RenderingIntent">Magick::RelativeIntent</a>
</p>
</div>
<div class="sig">
<h3 id="border_color">border_color</h3>
<p>
<span class="arg">img.</span>border_color -> <em>string</em><br />
<span class="arg">img.</span>border_color = <span class="arg">string</span> or <span class="arg">pixel</span> -> <em>string</em> or <em>pixel</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The image's border color. The default border color is "#dfdfdf" (gray).</p>
<h4>Argument</h4>
<p>Either a <a href="imusage.html#color_names">color name</a> or a <a href="struct.html#Pixel">Pixel</a> object.</p>
<h4>Returns</h4>
<p>A color name.</p>
</div>
<div class="sig">
<h3 id="bounding_box">bounding_box</h3>
<p><span class="arg">img.</span>bounding_box -> <em>rectangle</em><br /></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Returns the bounding box of an image canvas. Get-only.</p>
<h4>Returns</h4>
<p>A <a href="struct.html#Rectangle">Rectangle</a> object.</p>
</div>
<div class="sig">
<h3 id="chromaticity">chromaticity</h3>
<p>
<span class="arg">img.</span>chromaticity -> <em>chromaticity</em><br />
<span class="arg">img.</span>chromaticity = <span class="arg">chromaticity</span> -> <em>chromaticity</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The <span class="imquote">red, green, blue, and white-point chromaticity values.</span>.</p>
<h4>Argument</h4>
<p>A <a href="struct.html#Chromaticity">Chromaticity</a> object.</p>
<h4>Returns</h4>
<p>A <a href="struct.html#Chromaticity">Chromaticity</a> object.</p>
</div>
<div class="sig">
<h3 id="class_type">class_type</h3>
<p>
<span class="arg">img.</span>class_type -> <em>storage_class</em><br />
<span class="arg">img.</span>class_type = <span class="arg">storage_class</span> -> <em>storage_class</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
The image's <em>storage class</em>.
<span class="imquote">
If DirectClass then the pixels contain valid RGB or CMYK colors. If PseudoClass then the image has a colormap referenced by the pixel's index member.
</span>
</p>
<h4>Argument</h4>
<p>A <a href="constants.html#ClassType">ClassType</a> constant.</p>
<h4>Returns</h4>
<p>A <a href="constants.html#ClassType">ClassType</a> constant.</p>
</div>
<div class="sig">
<h3 id="color_profile">color_profile</h3>
<p>
<span class="arg">img.</span>color_profile -> <em>string</em><br />
<span class="arg">img.</span>color_profile = <span class="arg">string</span> -> <em>string</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
The
<a href="https://www.color.org/icc_specs2.html">ICC color profile</a>.
</p>
<h4>Argument</h4>
<p>
A color profile is represented as a string. If the argument is
<code>nil</code> instead of <span class="arg">string</span> then any ICC color profile present in the image is deleted.
</p>
<p>
The setter form of this attribute deletes any existing ICC color profile(s) before adding the new one. If you need to add both source and destination
profiles use <a href="image1.html#add_profile">add_profile</a> or <a href="image3.html#profile_bang">profile!</a>.
</p>
<h4>Returns</h4>
<p>The current color profile, or <code>nil</code> if there is no profile.</p>
<h4>See also</h4>
<p>
<a href="image1.html#add_profile">add_profile</a>, <a href="image1.html#delete_profile">delete_profile</a>,
<a href="image2.html#each_profile">each_profile</a>,
<a href="image3.html#profile_bang">profile!</a>
</p>
</div>
<div class="sig">
<h3 id="colors">colors</h3>
<p><span class="arg">img.</span>colors -> <em>integer</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
The number of colors in the colormap. Only meaningful for
<a href="constants.html#ClassType">PseudoClass</a> images. Get-only.
</p>
</div>
<div class="sig">
<h3 id="colorspace">colorspace</h3>
<p>
<span class="arg">img.</span>colorspace -> <em>colorspace</em><br />
<span class="arg">img.</span>colorspace = <span class="arg">colorspace</span> -> <em>colorspace</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">
Image pixel interpretation. If the
<a href="constants.html#ColorspaceType">colorspace</a> is RGBColorspace the pixels are red, green, blue. If <a href="image1.html#alpha_q">alpha?</a> is
true, then red, green, blue, and opacity. If it is CMYKColorspace, the pixels are cyan, yellow, magenta, black. Otherwise the colorspace is ignored.
</p>
<h4>Argument</h4>
<p>A <a href="constants.html#ColorspaceType">ColorspaceType</a> constant.</p>
<h4>Returns</h4>
<p>A <a href="constants.html#ColorspaceType">ColorspaceType</a> constant.</p>
</div>
<div class="sig">
<h3 id="columns">columns</h3>
<p><span class="arg">img.</span>columns -> <em>integer</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The width of the image in pixels. Get-only.</p>
</div>
<div class="sig">
<h3 id="compose">compose</h3>
<p>
<span class="arg">img.</span>compose -> <em>operator</em><br />
<span class="arg">img.</span>compose = <span class="arg">operator</span> -> <em>operator</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
The image composite operator. The default is OverCompositeOp. See
<a href="ilist.html#montage">montage</a>.
</p>
<h4>Argument</h4>
<p>A <a href="constants.html#CompositeOperator">composite operator</a> constant.</p>
<h4>Returns</h4>
<p>A <a href="constants.html#CompositeOperator">composite operator</a> constant.</p>
</div>
<div class="sig">
<h3 id="compression">compression</h3>
<p>
<span class="arg">img.</span>compression -> <em>type</em><br />
<span class="arg">img.</span>compression = <span class="arg">type</span> -> <em>type</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The image compression type. The default is the compression type of the specified image file.</p>
<h4>Argument</h4>
<p>A <a href="constants.html#CompressionType">CompressionType</a> constant.</p>
<h4>Returns</h4>
<p>A <a href="constants.html#CompressionType">CompressionType</a> constant.</p>
</div>
<div class="sig">
<h3 id="delay">delay</h3>
<p>
<span class="arg">img.</span>delay -> <em>integer</em><br />
<span class="arg">img.</span>delay = <span class="arg">integer</span> -> <em>integer</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
Number of ticks which must expire before displaying the next image in an animated sequence. The default number of ticks is 0. By default there are 100
ticks per second but this number can be changed via the <a href="#ticks_per_second">ticks_per_second</a> attribute.
</p>
<h4>Argument</h4>
<p>An integer value between 0 and 65535, inclusive.</p>
<h4>Returns</h4>
<p>The current delay value.</p>
</div>
<div class="sig">
<h3 id="density">density</h3>
<p>
<span class="arg">img.</span>density -> <em>string</em><br />
<span class="arg">img.</span>density = <span class="arg">string</span> or <span class="arg">geometry</span> -> <em>string</em> or <em>geometry</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
The
<span class="imquote">vertical and horizontal resolution in pixels of the image.</span>
The default is "72x72".
</p>
<h4>Argument</h4>
<p>
The density may be expressed either as a string or a
<a href="struct.html#Geometry">Geometry</a> object. If a string, it is in the form "XxY", or simply "X". If "Y" is omitted it is set to "X". To specify
the density with a Geometry object, set the <code>width</code> attribute to the x resolution and the <code>height</code> argument to the y resolution.
If <code>height</code> is nil, <code>width</code> will be used as the y resolution as well.
</p>
<h4>Returns</h4>
<p>The image density represented as a string.</p>
<h4>See also</h4>
<p>Also see <a href="#x_resolution">x_resolution</a> and <a href="#y_resolution">y_resolution</a>.</p>
</div>
<div class="sig">
<h3 id="depth">depth</h3>
<p><span class="arg">img.</span>depth -> <em>integer</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The image depth (8, 16, or 32). Get-only.</p>
</div>
<div class="sig">
<h3 id="directory">directory</h3>
<p><span class="arg">img.</span>directory -> <em>string</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
<span class="imquote">
Tile names from within an image montage. Only valid after calling <a href="ilist.html#montage">montage</a> or reading a MIFF file which contains a
directory.
</span>
Get-only.
</p>
<h4>Returns</h4>
<p>A newline ("\n")-delimited list of the images in the montage.</p>
</div>
<div class="sig">
<h3 id="dispose">dispose</h3>
<p>
<span class="arg">img.</span>dispose -> <em>method</em><br />
<span class="arg">img.</span>dispose = <span class="arg">method</span> -> <em>method</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">
GIF disposal method. This attribute is used to control how successive images are rendered (how the preceding image is disposed of) when creating a GIF
animation.
</p>
<h4>Argument</h4>
<p>An integer corresponding to the disposal method.</p>
<h4>Returns</h4>
<p>A <a href="constants.html#DisposeType">DisposeType</a> constant.</p>
</div>
<div class="sig">
<h3 id="endian">endian</h3>
<p>
<span class="arg">img.</span>endian -> <em>endian</em><br />
<span class="arg">img.</span>endian = <span class="arg">endian</span> -> <em>endian</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">Specify an endian option for images that support it.</p>
<h4>Argument</h4>
<p>A <a href="constants.html#EndianType">EndianType</a> constant.</p>
<h4>Returns</h4>
<p>A <a href="constants.html#EndianType">EndianType</a> constant.</p>
</div>
<div class="sig">
<h3 id="extract_info">extract_info</h3>
<p>
<span class="arg">img.</span>extract_info -> <em>rectangle</em><br />
<span class="arg">img.</span>extract_info = <span class="arg">rectangle</span>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
Specify a rectangle within an image, or retrieve the rectangle specified when the image was constituted. See
<a href="info.html#extract">extract=</a>.
</p>
<h4>Argument</h4>
<p>A <a href="struct.html#Rectangle">Rectangle</a> object.</p>
<h4>Returns</h4>
<p>A <a href="struct.html#Rectangle">Rectangle</a> object.</p>
</div>
<div class="sig">
<h3 id="filename">filename</h3>
<p><span class="arg">img.</span>filename -> <em>string</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The image filename. Get-only.</p>
</div>
<div class="sig">
<h3 id="filesize">filesize</h3>
<p><span class="arg">img.</span>filesize -> <em>integer</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>The image filesize in bytes. Get-only.</p>
</div>
<div class="sig">
<h3 id="filter">filter</h3>
<p>
<span class="arg">img.</span>filter -> <em>type</em><br />
<span class="arg">img.</span>filter = <span class="arg">type</span> -> <em>type</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">
Filter to use when resizing image. The reduction filter employed has a significant effect on the time required to resize an image and the resulting
quality. The default filter is Lanczos which has been shown to produce high quality results when reducing most images.
</p>
<h4>Argument</h4>
<p>A <a href="constants.html#FilterType">FilterType</a> constant.</p>
<h4>Returns</h4>
<p>A <a href="constants.html#FilterType">FilterType</a> constant.</p>
</div>
<div class="sig">
<h3 id="format">format</h3>
<p>
<span class="arg">img.</span>format -> <em>string</em><br />
<span class="arg">img.</span>format = <span class="arg">string</span> -> <em>string</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
The image encoding format. For example, "GIF" or "PNG". See
<a href="magick.html#formats">formats</a>.
</p>
<h4>Argument</h4>
<p>The format name.</p>
<h4>Returns</h4>
<p>The format name.</p>
</div>
<div class="sig">
<h3 id="fuzz">fuzz</h3>
<p>
<span class="arg">img.</span>fuzz -> <em>float</em><br />
<span class="arg">img.</span>fuzz = <span class="arg">float</span> or <span class="arg">string</span> -> <em>float</em> or <em>string</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
<span class="imquote">
Colors within this distance are considered equal. A number of algorithms search for a target color. By default the color must be exact. Use this
</span>
[attribute]
<span class="imquote">to match colors that are close to the target color in RGB space.</span>
</p>
<p>
See <a href="image2.html#opaque">opaque</a>, <a href="image3.html#texture_floodfill">texture_floodfill</a>, and
<a href="image3.html#transparent">transparent</a>.
</p>
<h4>Argument</h4>
<p>
The argument may be a floating-point numeric value or a string in the form "NN%". In the second case, the argument is computed as a percentage of
<a href="constants.html#Miscellaneous_constants">QuantumRange</a>. For example, a value of '5%' sets <code>fuzz</code> to 0.05*QuantumRange.
</p>
<h4>Returns</h4>
<p>A <code>Float</code> or string</p>
</div>
<div class="sig">
<h3 id="gamma">gamma</h3>
<p>
<span class="arg">img.</span>gamma -> <em>float</em><br />
<span>image.</span>gamma = <span class="arg">float</span> -> <em>float</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">
Gamma level of the image. The same color image displayed on two different workstations may look different due to differences in the display monitor. Use
gamma correction to adjust for this color difference.
</p>
</div>
<div class="sig">
<h3 id="geometry">geometry</h3>
<p>
<span class="arg">img.</span>geometry -> <em>string</em><br />
<span class="arg">img.</span>geometry = <span class="arg">string</span> -> <em>string</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">Preferred size of the image when encoding.</p>
<h4>Argument</h4>
<p>A <a href="imusage.html#geometry">geometry string</a>.</p>
<h4>Returns</h4>
<p>A <a href="imusage.html#geometry">geometry string</a>.</p>
</div>
<div class="sig">
<h3 id="gravity">gravity</h3>
<p>
<span class="arg">img</span>.gravity -> <em>gravity</em><br />
<span class="arg">img</span>.gravity = <span class="arg">gravity</span> -> <em>gravity</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
Used with the <a href="ilist.html#composite_layers">ImageList#composite_layers</a> method.
<span class="imquote">The direction that the image gravitates within the composite.</span>
</p>
<h4>Argument</h4>
<p>A <a href="constants.html#GravityType">GravityType</a> value.</p>
<h4>Returns</h4>
<p>A <a href="constants.html#GravityType">GravityType</a> value.</p>
</div>
<div class="sig">
<h3 id="image_type">image_type</h3>
<p>
<span class="arg">img.</span>image_type -> <em>type</em><br />
<span class="arg">img</span>.image_type = <span class="arg">type</span> -> <em>type</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
The image type classification. For example, GrayscaleType. Don't confuse this attribute with the <a href="#format">format</a>, that is "GIF" or "JPG".
Get-only.
</p>
<h4>Argument</h4>
<p>An <a href="constants.html#ImageType">ImageType</a> value.</p>
<h4>Returns</h4>
<p>An <a href="constants.html#ImageType">ImageType</a> value.</p>
</div>
<div class="sig">
<h3 id="interlace">interlace</h3>
<p>
<span class="arg">img.</span>interlace -> <em>type</em><br />
<span class="arg">img.</span>interlace = <span class="arg">type</span> -> <em>type</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p class="imquote">
The type of interlacing scheme (default NoInterlace). This option is used to specify the type of interlacing scheme for raw image formats such as RGB or
YUV. NoInterlace means do not interlace, LineInterlace uses scanline interlacing, and PlaneInterlace uses plane interlacing. PartitionInterlace is like
PlaneInterlace except the different planes are saved to individual files (e.g. image.R, image.G, and image.B). Use LineInterlace or PlaneInterlace to
create an interlaced GIF or progressive JPEG image.
</p>
<h4>Argument</h4>
<p>An <a href="constants.html#InterlaceType">InterlaceType</a> constant.</p>
<h4>Returns</h4>
<p>An <a href="constants.html#InterlaceType">InterlaceType</a> constant.</p>
</div>
<div class="sig">
<h3 id="iptc_profile">iptc_profile</h3>
<p>
<span class="arg">img.</span>iptc_profile -> <em>string</em><br />
<span class="arg">img.</span>iptc_profile = <span class="arg">string</span> -> <em>string</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
The
<a href="https://www.iptc.org/IIM/">International Press Telecommunications Council profile</a>.
</p>
<h4>Argument</h4>
<p>
A IPTC profile is represented as a string. If the argument is
<code>nil</code> instead of <span class="arg">string</span> then any IPTC profile present in the image is deleted.
</p>
<h4>Returns</h4>
<p>The current IPTC profile, or <code>nil</code> if there is no profile.</p>
<h4>See also</h4>
<p>
<a href="image1.html#add_profile">add_profile</a>, <a href="image1.html#delete_profile">delete_profile</a>,
<a href="image2.html#each_profile">each_profile</a>.
<a href="image3.html#profile_bang">profile!</a>
</p>
</div>
<div class="sig">
<h3 id="matte_color">matte_color</h3>
<p>
<span class="arg">img.</span>matte_color -> <em>string</em><br />
<span class="arg">img.</span>matte_color = <span class="arg">string</span> or <span class="arg">pixel</span> -> <em>string</em> or <em>pixel</em>
</p>
</div>
<div class="desc">
<h4>Description</h4>
<p>Specify the matte color.</p>
<h4>Returns</h4>
<p>A matte color name or <a href="struct.html#Pixel">Pixel</a> object.</p>
</div>
<div class="sig">
<h3 id="mean_error_per_pixel">mean_error_per_pixel</h3>
<p><span class="arg">img.</span>mean_error_per_pixel -> <em>float</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
<span class="imquote">The mean error per pixel computed when a image is color reduced.</span>
This attribute is only valid if the <code>measure_error</code> argument to <code>quantize</code><a href="ilist.html#quantize">[ImageList]</a>
<a href="image3.html#quantize">[Image]</a> is set to <code>true</code>. Get-only.
</p>
</div>
<div class="sig">
<h3 id="mime_type">mime_type</h3>
<p><span class="arg">img.</span>mime_type -> <em>string</em></p>
</div>
<div class="desc">
<h4>Description</h4>
<p>
<span class="imquote">Returns the officially registered (or de facto) MIME media-type.</span>
If there is no registered media-type, returns "image/x-magick". Get-only.