forked from bjmashibing/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImage.html
More file actions
875 lines (873 loc) · 37.4 KB
/
Image.html
File metadata and controls
875 lines (873 loc) · 37.4 KB
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
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Image (Java SE 12 & JDK 12 )</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="java.awt.Image class">
<meta name="keywords" content="accelerationPriority">
<meta name="keywords" content="UndefinedProperty">
<meta name="keywords" content="SCALE_DEFAULT">
<meta name="keywords" content="SCALE_FAST">
<meta name="keywords" content="SCALE_SMOOTH">
<meta name="keywords" content="SCALE_REPLICATE">
<meta name="keywords" content="SCALE_AREA_AVERAGING">
<meta name="keywords" content="getWidth()">
<meta name="keywords" content="getHeight()">
<meta name="keywords" content="getSource()">
<meta name="keywords" content="getGraphics()">
<meta name="keywords" content="getProperty()">
<meta name="keywords" content="getScaledInstance()">
<meta name="keywords" content="flush()">
<meta name="keywords" content="getCapabilities()">
<meta name="keywords" content="setAccelerationPriority()">
<meta name="keywords" content="getAccelerationPriority()">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Image (Java SE 12 & JDK 12 )";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":6,"i4":6,"i5":6,"i6":10,"i7":6,"i8":6,"i9":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Image.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 & JDK 12</strong> </div></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field.summary">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="moduleLabelInType">Module</span> <a href="../../module-summary.html">java.desktop</a></div>
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">java.awt</a></div>
<h2 title="Class Image" class="title">Class Image</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="../../../java.base/java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>java.awt.Image</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="image/AbstractMultiResolutionImage.html" title="class in java.awt.image">AbstractMultiResolutionImage</a></code>, <code><a href="image/BufferedImage.html" title="class in java.awt.image">BufferedImage</a></code>, <code><a href="image/VolatileImage.html" title="class in java.awt.image">VolatileImage</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">Image</span>
extends <a href="../../../java.base/java/lang/Object.html" title="class in java.lang">Object</a></pre>
<div class="block">The abstract class <code>Image</code> is the superclass of all
classes that represent graphical images. The image must be
obtained in a platform-specific manner.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<div class="memberSummary">
<table>
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>protected float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#accelerationPriority">accelerationPriority</a></span></code></th>
<td class="colLast">
<div class="block">Priority for accelerating this image.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SCALE_AREA_AVERAGING">SCALE_AREA_AVERAGING</a></span></code></th>
<td class="colLast">
<div class="block">Use the Area Averaging image scaling algorithm.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SCALE_DEFAULT">SCALE_DEFAULT</a></span></code></th>
<td class="colLast">
<div class="block">Use the default image-scaling algorithm.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SCALE_FAST">SCALE_FAST</a></span></code></th>
<td class="colLast">
<div class="block">Choose an image-scaling algorithm that gives higher priority
to scaling speed than smoothness of the scaled image.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SCALE_REPLICATE">SCALE_REPLICATE</a></span></code></th>
<td class="colLast">
<div class="block">Use the image scaling algorithm embodied in the
<code>ReplicateScaleFilter</code> class.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SCALE_SMOOTH">SCALE_SMOOTH</a></span></code></th>
<td class="colLast">
<div class="block">Choose an image-scaling algorithm that gives higher priority
to image smoothness than scaling speed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../java.base/java/lang/Object.html" title="class in java.lang">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#UndefinedProperty">UndefinedProperty</a></span></code></th>
<td class="colLast">
<div class="block">The <code>UndefinedProperty</code> object should be returned whenever a
property which was not defined for a particular image is fetched.</div>
</td>
</tr>
</tbody>
</table>
</div>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<div class="memberSummary">
<table>
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Image</a></span>()</code></th>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</div>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="tableTab" onclick="show(4);">Abstract Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flush()">flush</a></span>()</code></th>
<td class="colLast">
<div class="block">Flushes all reconstructable resources being used by this Image object.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAccelerationPriority()">getAccelerationPriority</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the current value of the acceleration priority hint.</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code><a href="ImageCapabilities.html" title="class in java.awt">ImageCapabilities</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCapabilities(java.awt.GraphicsConfiguration)">getCapabilities</a></span>​(<a href="GraphicsConfiguration.html" title="class in java.awt">GraphicsConfiguration</a> gc)</code></th>
<td class="colLast">
<div class="block">Returns an ImageCapabilities object which can be
inquired as to the capabilities of this
Image on the specified GraphicsConfiguration.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>abstract <a href="Graphics.html" title="class in java.awt">Graphics</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getGraphics()">getGraphics</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates a graphics context for drawing to an off-screen image.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>abstract int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHeight(java.awt.image.ImageObserver)">getHeight</a></span>​(<a href="image/ImageObserver.html" title="interface in java.awt.image">ImageObserver</a> observer)</code></th>
<td class="colLast">
<div class="block">Determines the height of the image.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>abstract <a href="../../../java.base/java/lang/Object.html" title="class in java.lang">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProperty(java.lang.String,java.awt.image.ImageObserver)">getProperty</a></span>​(<a href="../../../java.base/java/lang/String.html" title="class in java.lang">String</a> name,
<a href="image/ImageObserver.html" title="interface in java.awt.image">ImageObserver</a> observer)</code></th>
<td class="colLast">
<div class="block">Gets a property of this image by name.</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code><a href="Image.html" title="class in java.awt">Image</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getScaledInstance(int,int,int)">getScaledInstance</a></span>​(int width,
int height,
int hints)</code></th>
<td class="colLast">
<div class="block">Creates a scaled version of this image.</div>
</td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code>abstract <a href="image/ImageProducer.html" title="interface in java.awt.image">ImageProducer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSource()">getSource</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the object that produces the pixels for the image.</div>
</td>
</tr>
<tr class="altColor" id="i8">
<td class="colFirst"><code>abstract int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWidth(java.awt.image.ImageObserver)">getWidth</a></span>​(<a href="image/ImageObserver.html" title="interface in java.awt.image">ImageObserver</a> observer)</code></th>
<td class="colLast">
<div class="block">Determines the width of the image.</div>
</td>
</tr>
<tr class="rowColor" id="i9">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAccelerationPriority(float)">setAccelerationPriority</a></span>​(float priority)</code></th>
<td class="colLast">
<div class="block">Sets a hint for this image about how important acceleration is.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods declared in class java.lang.<a href="../../../java.base/java/lang/Object.html" title="class in java.lang">Object</a></h3>
<code><a href="../../../java.base/java/lang/Object.html#clone()">clone</a>, <a href="../../../java.base/java/lang/Object.html#equals(java.lang.Object)">equals</a>, <a href="../../../java.base/java/lang/Object.html#finalize()">finalize</a>, <a href="../../../java.base/java/lang/Object.html#getClass()">getClass</a>, <a href="../../../java.base/java/lang/Object.html#hashCode()">hashCode</a>, <a href="../../../java.base/java/lang/Object.html#notify()">notify</a>, <a href="../../../java.base/java/lang/Object.html#notifyAll()">notifyAll</a>, <a href="../../../java.base/java/lang/Object.html#toString()">toString</a>, <a href="../../../java.base/java/lang/Object.html#wait()">wait</a>, <a href="../../../java.base/java/lang/Object.html#wait(long)">wait</a>, <a href="../../../java.base/java/lang/Object.html#wait(long,int)">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="accelerationPriority">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>accelerationPriority</h4>
<pre>protected float accelerationPriority</pre>
<div class="block">Priority for accelerating this image. Subclasses are free to
set different default priorities and applications are free to
set the priority for specific images via the
<code>setAccelerationPriority(float)</code> method.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.5</dd>
</dl>
</li>
</ul>
<a id="UndefinedProperty">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UndefinedProperty</h4>
<pre>public static final <a href="../../../java.base/java/lang/Object.html" title="class in java.lang">Object</a> UndefinedProperty</pre>
<div class="block">The <code>UndefinedProperty</code> object should be returned whenever a
property which was not defined for a particular image is fetched.</div>
</li>
</ul>
<a id="SCALE_DEFAULT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SCALE_DEFAULT</h4>
<pre>public static final int SCALE_DEFAULT</pre>
<div class="block">Use the default image-scaling algorithm.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#java.awt.Image.SCALE_DEFAULT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SCALE_FAST">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SCALE_FAST</h4>
<pre>public static final int SCALE_FAST</pre>
<div class="block">Choose an image-scaling algorithm that gives higher priority
to scaling speed than smoothness of the scaled image.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#java.awt.Image.SCALE_FAST">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SCALE_SMOOTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SCALE_SMOOTH</h4>
<pre>public static final int SCALE_SMOOTH</pre>
<div class="block">Choose an image-scaling algorithm that gives higher priority
to image smoothness than scaling speed.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#java.awt.Image.SCALE_SMOOTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SCALE_REPLICATE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SCALE_REPLICATE</h4>
<pre>public static final int SCALE_REPLICATE</pre>
<div class="block">Use the image scaling algorithm embodied in the
<code>ReplicateScaleFilter</code> class.
The <code>Image</code> object is free to substitute a different filter
that performs the same algorithm yet integrates more efficiently
into the imaging infrastructure supplied by the toolkit.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="image/ReplicateScaleFilter.html" title="class in java.awt.image"><code>ReplicateScaleFilter</code></a>,
<a href="../../../constant-values.html#java.awt.Image.SCALE_REPLICATE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SCALE_AREA_AVERAGING">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SCALE_AREA_AVERAGING</h4>
<pre>public static final int SCALE_AREA_AVERAGING</pre>
<div class="block">Use the Area Averaging image scaling algorithm. The
image object is free to substitute a different filter that
performs the same algorithm yet integrates more efficiently
into the image infrastructure supplied by the toolkit.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="image/AreaAveragingScaleFilter.html" title="class in java.awt.image"><code>AreaAveragingScaleFilter</code></a>,
<a href="../../../constant-values.html#java.awt.Image.SCALE_AREA_AVERAGING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="<init>()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Image</h4>
<pre>public Image()</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getWidth(java.awt.image.ImageObserver)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWidth</h4>
<pre class="methodSignature">public abstract int getWidth​(<a href="image/ImageObserver.html" title="interface in java.awt.image">ImageObserver</a> observer)</pre>
<div class="block">Determines the width of the image. If the width is not yet known,
this method returns <code>-1</code> and the specified
<code>ImageObserver</code> object is notified later.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>observer</code> - an object waiting for the image to be loaded.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the width of this image, or <code>-1</code>
if the width is not yet known.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getHeight(java.awt.image.ImageObserver)"><code>getHeight(java.awt.image.ImageObserver)</code></a>,
<a href="image/ImageObserver.html" title="interface in java.awt.image"><code>ImageObserver</code></a></dd>
</dl>
</li>
</ul>
<a id="getHeight(java.awt.image.ImageObserver)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeight</h4>
<pre class="methodSignature">public abstract int getHeight​(<a href="image/ImageObserver.html" title="interface in java.awt.image">ImageObserver</a> observer)</pre>
<div class="block">Determines the height of the image. If the height is not yet known,
this method returns <code>-1</code> and the specified
<code>ImageObserver</code> object is notified later.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>observer</code> - an object waiting for the image to be loaded.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the height of this image, or <code>-1</code>
if the height is not yet known.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getWidth(java.awt.image.ImageObserver)"><code>getWidth(java.awt.image.ImageObserver)</code></a>,
<a href="image/ImageObserver.html" title="interface in java.awt.image"><code>ImageObserver</code></a></dd>
</dl>
</li>
</ul>
<a id="getSource()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSource</h4>
<pre class="methodSignature">public abstract <a href="image/ImageProducer.html" title="interface in java.awt.image">ImageProducer</a> getSource()</pre>
<div class="block">Gets the object that produces the pixels for the image.
This method is called by the image filtering classes and by
methods that perform image conversion and scaling.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the image producer that produces the pixels
for this image.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="image/ImageProducer.html" title="interface in java.awt.image"><code>ImageProducer</code></a></dd>
</dl>
</li>
</ul>
<a id="getGraphics()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGraphics</h4>
<pre class="methodSignature">public abstract <a href="Graphics.html" title="class in java.awt">Graphics</a> getGraphics()</pre>
<div class="block">Creates a graphics context for drawing to an off-screen image.
This method can only be called for off-screen images.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a graphics context to draw to the off-screen image.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../java.base/java/lang/UnsupportedOperationException.html" title="class in java.lang">UnsupportedOperationException</a></code> - if called for a
non-off-screen image.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Graphics.html" title="class in java.awt"><code>Graphics</code></a>,
<a href="Component.html#createImage(int,int)"><code>Component.createImage(int, int)</code></a></dd>
</dl>
</li>
</ul>
<a id="getProperty(java.lang.String,java.awt.image.ImageObserver)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProperty</h4>
<pre class="methodSignature">public abstract <a href="../../../java.base/java/lang/Object.html" title="class in java.lang">Object</a> getProperty​(<a href="../../../java.base/java/lang/String.html" title="class in java.lang">String</a> name,
<a href="image/ImageObserver.html" title="interface in java.awt.image">ImageObserver</a> observer)</pre>
<div class="block">Gets a property of this image by name.
<p>
Individual property names are defined by the various image
formats. If a property is not defined for a particular image, this
method returns the <code>UndefinedProperty</code> object.
<p>
If the properties for this image are not yet known, this method
returns <code>null</code>, and the <code>ImageObserver</code>
object is notified later.
<p>
The property name <code>"comment"</code> should be used to store
an optional comment which can be presented to the application as a
description of the image, its source, or its author.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a property name.</dd>
<dd><code>observer</code> - an object waiting for this image to be loaded.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value of the named property.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../java.base/java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the property name is null.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="image/ImageObserver.html" title="interface in java.awt.image"><code>ImageObserver</code></a>,
<a href="#UndefinedProperty"><code>UndefinedProperty</code></a></dd>
</dl>
</li>
</ul>
<a id="getScaledInstance(int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScaledInstance</h4>
<pre class="methodSignature">public <a href="Image.html" title="class in java.awt">Image</a> getScaledInstance​(int width,
int height,
int hints)</pre>
<div class="block">Creates a scaled version of this image.
A new <code>Image</code> object is returned which will render
the image at the specified <code>width</code> and
<code>height</code> by default. The new <code>Image</code> object
may be loaded asynchronously even if the original source image
has already been loaded completely.
<p>
If either <code>width</code>
or <code>height</code> is a negative number then a value is
substituted to maintain the aspect ratio of the original image
dimensions. If both <code>width</code> and <code>height</code>
are negative, then the original image dimensions are used.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>width</code> - the width to which to scale the image.</dd>
<dd><code>height</code> - the height to which to scale the image.</dd>
<dd><code>hints</code> - flags to indicate the type of algorithm to use
for image resampling.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a scaled version of the image.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../java.base/java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if <code>width</code>
or <code>height</code> is zero.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#SCALE_DEFAULT"><code>SCALE_DEFAULT</code></a>,
<a href="#SCALE_FAST"><code>SCALE_FAST</code></a>,
<a href="#SCALE_SMOOTH"><code>SCALE_SMOOTH</code></a>,
<a href="#SCALE_REPLICATE"><code>SCALE_REPLICATE</code></a>,
<a href="#SCALE_AREA_AVERAGING"><code>SCALE_AREA_AVERAGING</code></a></dd>
</dl>
</li>
</ul>
<a id="flush()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre class="methodSignature">public void flush()</pre>
<div class="block">Flushes all reconstructable resources being used by this Image object.
This includes any pixel data that is being cached for rendering to
the screen as well as any system resources that are being used
to store data or pixels for the image if they can be recreated.
The image is reset to a state similar to when it was first created
so that if it is again rendered, the image data will have to be
recreated or fetched again from its source.
<p>
Examples of how this method affects specific types of Image object:
<ul>
<li>
BufferedImage objects leave the primary Raster which stores their
pixels untouched, but flush any information cached about those
pixels such as copies uploaded to the display hardware for
accelerated blits.
<li>
Image objects created by the Component methods which take a
width and height leave their primary buffer of pixels untouched,
but have all cached information released much like is done for
BufferedImage objects.
<li>
VolatileImage objects release all of their pixel resources
including their primary copy which is typically stored on
the display hardware where resources are scarce.
These objects can later be restored using their
<a href="image/VolatileImage.html#validate(java.awt.GraphicsConfiguration)"><code>validate</code></a>
method.
<li>
Image objects created by the Toolkit and Component classes which are
loaded from files, URLs or produced by an <a href="image/ImageProducer.html" title="interface in java.awt.image"><code>ImageProducer</code></a>
are unloaded and all local resources are released.
These objects can later be reloaded from their original source
as needed when they are rendered, just as when they were first
created.
</ul></div>
</li>
</ul>
<a id="getCapabilities(java.awt.GraphicsConfiguration)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCapabilities</h4>
<pre class="methodSignature">public <a href="ImageCapabilities.html" title="class in java.awt">ImageCapabilities</a> getCapabilities​(<a href="GraphicsConfiguration.html" title="class in java.awt">GraphicsConfiguration</a> gc)</pre>
<div class="block">Returns an ImageCapabilities object which can be
inquired as to the capabilities of this
Image on the specified GraphicsConfiguration.
This allows programmers to find
out more runtime information on the specific Image
object that they have created. For example, the user
might create a BufferedImage but the system may have
no video memory left for creating an image of that
size on the given GraphicsConfiguration, so although the object
may be acceleratable in general, it
does not have that capability on this GraphicsConfiguration.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>gc</code> - a <code>GraphicsConfiguration</code> object. A value of null
for this parameter will result in getting the image capabilities
for the default <code>GraphicsConfiguration</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <code>ImageCapabilities</code> object that contains
the capabilities of this <code>Image</code> on the specified
GraphicsConfiguration.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.5</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="image/VolatileImage.html#getCapabilities()"><code>VolatileImage.getCapabilities()</code></a></dd>
</dl>
</li>
</ul>
<a id="setAccelerationPriority(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAccelerationPriority</h4>
<pre class="methodSignature">public void setAccelerationPriority​(float priority)</pre>
<div class="block">Sets a hint for this image about how important acceleration is.
This priority hint is used to compare to the priorities of other
Image objects when determining how to use scarce acceleration
resources such as video memory. When and if it is possible to
accelerate this Image, if there are not enough resources available
to provide that acceleration but enough can be freed up by
de-accelerating some other image of lower priority, then that other
Image may be de-accelerated in deference to this one. Images
that have the same priority take up resources on a first-come,
first-served basis.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>priority</code> - a value between 0 and 1, inclusive, where higher
values indicate more importance for acceleration. A value of 0
means that this Image should never be accelerated. Other values
are used simply to determine acceleration priority relative to other
Images.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../java.base/java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if <code>priority</code> is less
than zero or greater than 1.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.5</dd>
</dl>
</li>
</ul>
<a id="getAccelerationPriority()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getAccelerationPriority</h4>
<pre class="methodSignature">public float getAccelerationPriority()</pre>
<div class="block">Returns the current value of the acceleration priority hint.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>value between 0 and 1, inclusive, which represents the current
priority value</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.5</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setAccelerationPriority(float)"><code>setAccelerationPriority</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Image.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 & JDK 12</strong> </div></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field.summary">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small><a href="https://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> For further API reference and developer documentation see the <a href="https://docs.oracle.com/pls/topic/lookup?ctx=javase12.0.2&id=homepage" target="_blank">Java SE Documentation</a>, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.<br> <a href="../../../../legal/copyright.html">Copyright</a> © 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.<br>All rights reserved. Use is subject to <a href="https://www.oracle.com/technetwork/java/javase/terms/license/java12.0.2speclicense.html">license terms</a> and the <a href="https://www.oracle.com/technetwork/java/redist-137594.html">documentation redistribution policy</a>. <!-- Version 12.0.2+10 --></small></p>
</footer>
</body>
</html>