<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-21509</id>
	<title>Nabble - JAI Projects - Interest</title>
	<updated>2009-12-08T15:22:38Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/JAI-Projects---Interest-f21509.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/JAI-Projects---Interest-f21509.html" />
	<subtitle type="html">The main list for end users general discussions and developers to discuss the &lt;a href=&quot;https://jai.dev.java.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;JAI&lt;/a&gt;&amp;nbsp;project development issues and requirements for version control.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26702678</id>
	<title>question: photometric interpretation of tiff image with JPEG compression</title>
	<published>2009-12-08T15:22:38Z</published>
	<updated>2009-12-08T15:22:38Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">Anyone knows what's the difference with RGB and YCbCr as photometric interpretations of tiff image with JPEG compression? I did not see any when using JAI tiff encoder.
&lt;br&gt;[Message sent by forum member 'jiezhang' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=375451&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=375451&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26702678&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26702678&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question%3A-photometric-interpretation-of-tiff-image-with-JPEG-compression-tp26702678p26702678.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26626871</id>
	<title>RE: HSV Histogram creation</title>
	<published>2009-12-03T06:30:36Z</published>
	<updated>2009-12-03T06:30:36Z</updated>
	<author>
		<name>Nidel, Mike</name>
	</author>
	<content type="html">Have you tried converting your RGB image to an HSV image, and then simply
&lt;br&gt;running a histogram op on it?
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626871&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jai-interest@...&lt;/a&gt; [mailto:jai-
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626871&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Thursday, December 03, 2009 9:12 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626871&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [JAI] HSV Histogram creation
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is there anyway to create an HSV Histogram instead of the RGB currently
&lt;br&gt;&amp;gt; support by JAI. Not sure how to go about creating it. Any help would be
&lt;br&gt;&amp;gt; greatly appreciated.
&lt;br&gt;&amp;gt; Best,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Jean
&lt;br&gt;&amp;gt; [Message sent by forum member 'jvence' ]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=374534&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=374534&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626871&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626871&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626871&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626871&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HSV-Histogram-creation-tp26626555p26626871.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26626555</id>
	<title>HSV Histogram creation</title>
	<published>2009-12-03T06:11:50Z</published>
	<updated>2009-12-03T06:11:50Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">Is there anyway to create an HSV Histogram instead of the RGB currently support by JAI. Not sure how to go about creating it. Any help would be greatly appreciated.
&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;Jean
&lt;br&gt;[Message sent by forum member 'jvence' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=374534&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=374534&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626555&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626555&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HSV-Histogram-creation-tp26626555p26626555.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26623978</id>
	<title>Compose an image using two source images</title>
	<published>2009-12-03T02:40:51Z</published>
	<updated>2009-12-03T02:40:51Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I have two images with 100*100 pixels dimension in a GIF format. I want to join a part of each one to compose a new image : portion of the first image is (x=90, y=0, width=10, heigth=10), portion of the second image is (x=0, y=0, width=10, heigth=10). The final image dimension has to be a 20*10 pixels.
&lt;br&gt;&lt;br&gt;I have found the solution to crop a image (with ParameterBlock objet and crop operation) but I don't know how I can construct a new image using part of each image.
&lt;br&gt;&lt;br&gt;After this operation, I want to transform in grayscale the final image.
&lt;br&gt;&lt;br&gt;Could anybody help me ?
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;[Message sent by forum member 'beben92' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=374483&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=374483&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26623978&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26623978&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compose-an-image-using-two-source-images-tp26623978p26623978.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26609233</id>
	<title>Re: Display large tif image and scroll around</title>
	<published>2009-12-02T05:53:12Z</published>
	<updated>2009-12-02T05:53:12Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">For displaying large images you may use Rivi, which is open source and may work with both PlanarImage (requres JAI) and RenderedImage (&amp;quot;standalone&amp;quot;).
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://reader.imagero.com/rivi/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://reader.imagero.com/rivi/&lt;/a&gt;&lt;br&gt;[Message sent by forum member 'imagero' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=374290&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=374290&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26609233&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26609233&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Display-large-tif-image-and-scroll-around-tp26498015p26609233.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26503909</id>
	<title>Re: Display large tif image and scroll around</title>
	<published>2009-11-24T13:51:18Z</published>
	<updated>2009-11-24T13:51:18Z</updated>
	<author>
		<name>Bob Deen</name>
	</author>
	<content type="html">For display, check out my JadeDisplay component:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.openchannelfoundation.org/projects/JadeDisplay/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.openchannelfoundation.org/projects/JadeDisplay/&lt;/a&gt;&lt;br&gt;&lt;br&gt;which is now Open Source with a BSD-style license. &amp;nbsp;It was specifically 
&lt;br&gt;designed to display large files, and to do graphics overlays on them.
&lt;br&gt;&lt;br&gt;In order to efficiently manage a large file it will have to be tiled. 
&lt;br&gt;Search the archives, there's lots of info. &amp;nbsp;JAI is a good library to use 
&lt;br&gt;if you have to do any kind of processing at all.
&lt;br&gt;&lt;br&gt;Hope that helps...
&lt;br&gt;&lt;br&gt;-Bob
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503909&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jai-interest@...&lt;/a&gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi there,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am currently working on an application for OpticalCharacterRecognition Postcorrection, and what has to be done now is to display the image of the text (.tif format, about 20mb of size) and then scroll to a certain area in the image and mark it ( e.g. drawing a rectangle around it). 
&lt;br&gt;&amp;gt; We want to use that to help the user correct a word that is destroyed beyond recognizability by showing the image input so he can get what word it was.
&lt;br&gt;&amp;gt; I am a little confused on how to use the JAI Library, as all the tutorials I found contain deprecated methods. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So my questions:
&lt;br&gt;&amp;gt; - is JAI the library I should use or is there anything better out there (did not find anything)
&lt;br&gt;&amp;gt; - what influence does the resolution of the image have on the speed loading it and working on it
&lt;br&gt;&amp;gt; &amp;nbsp;(due to treatment of high resolution OCR images, I imagine it could help scaling the picture down before displaying it)
&lt;br&gt;&amp;gt; - any further hint on how to load images that size and do the scrolling / marking would be great.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt; [Message sent by forum member 'jahuudi' ]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=373125&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=373125&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503909&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503909&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503909&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26503909&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Display-large-tif-image-and-scroll-around-tp26498015p26503909.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26498280</id>
	<title>RE: Display large tif image and scroll around</title>
	<published>2009-11-24T07:44:39Z</published>
	<updated>2009-11-24T07:44:39Z</updated>
	<author>
		<name>Nidel, Mike</name>
	</author>
	<content type="html">You should use JAI ImageIO tools to read and write the TIFF file.
&lt;br&gt;This is a separate but related project, found at
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://jai-imageio.dev.java.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://jai-imageio.dev.java.net/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;For the rest of your processing, you may not need JAI at all but
&lt;br&gt;you can use the built-in Java2D framework in the JDK. If you can
&lt;br&gt;guarantee that your images will always fit in the Java heap memory,
&lt;br&gt;then you should proceed without JAI until you definitely need it.
&lt;br&gt;If you need support for larger (tiled) images that can't all fit in
&lt;br&gt;memory at one time, then you should use JAI.
&lt;br&gt;&lt;br&gt;For displaying the image itself, JAI does not provide a fully
&lt;br&gt;supported GUI widget. There is the DisplayJAI class, but as you
&lt;br&gt;see it is deprecated. You should build your own -- it's not too
&lt;br&gt;hard, you'll just have to do some geometry calculations.
&lt;br&gt;&lt;br&gt;I recommend you start to design your application, and when you
&lt;br&gt;get to the parts that require actually processing image pixels/tiles,
&lt;br&gt;see if you can come up with specific questions and post them here.
&lt;br&gt;If you have issues reading/writing the TIFF files, you should post
&lt;br&gt;them to the JAI-imageio list instead. You should probably avoid the
&lt;br&gt;TIFF codec components in the core JAI project.
&lt;br&gt;&lt;br&gt;&lt;br&gt;cheers,
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498280&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jai-interest@...&lt;/a&gt; [mailto:jai-
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498280&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Tuesday, November 24, 2009 10:33 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498280&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [JAI] Display large tif image and scroll around
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi there,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am currently working on an application for
&lt;br&gt;&amp;gt; OpticalCharacterRecognition Postcorrection, and what has to be done now
&lt;br&gt;&amp;gt; is to display the image of the text (.tif format, about 20mb of size)
&lt;br&gt;&amp;gt; and then scroll to a certain area in the image and mark it ( e.g.
&lt;br&gt;&amp;gt; drawing a rectangle around it).
&lt;br&gt;&amp;gt; We want to use that to help the user correct a word that is destroyed
&lt;br&gt;&amp;gt; beyond recognizability by showing the image input so he can get what
&lt;br&gt;&amp;gt; word it was.
&lt;br&gt;&amp;gt; I am a little confused on how to use the JAI Library, as all the
&lt;br&gt;&amp;gt; tutorials I found contain deprecated methods.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So my questions:
&lt;br&gt;&amp;gt; - is JAI the library I should use or is there anything better out there
&lt;br&gt;&amp;gt; (did not find anything)
&lt;br&gt;&amp;gt; - what influence does the resolution of the image have on the speed
&lt;br&gt;&amp;gt; loading it and working on it
&lt;br&gt;&amp;gt; &amp;nbsp;(due to treatment of high resolution OCR images, I imagine it could
&lt;br&gt;&amp;gt; help scaling the picture down before displaying it)
&lt;br&gt;&amp;gt; - any further hint on how to load images that size and do the scrolling
&lt;br&gt;&amp;gt; / marking would be great.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt; [Message sent by forum member 'jahuudi' ]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=373125&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=373125&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498280&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498280&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498280&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498280&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Display-large-tif-image-and-scroll-around-tp26498015p26498280.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26498015</id>
	<title>Display large tif image and scroll around</title>
	<published>2009-11-24T07:32:34Z</published>
	<updated>2009-11-24T07:32:34Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">Hi there,
&lt;br&gt;&lt;br&gt;I am currently working on an application for OpticalCharacterRecognition Postcorrection, and what has to be done now is to display the image of the text (.tif format, about 20mb of size) and then scroll to a certain area in the image and mark it ( e.g. drawing a rectangle around it). 
&lt;br&gt;We want to use that to help the user correct a word that is destroyed beyond recognizability by showing the image input so he can get what word it was.
&lt;br&gt;I am a little confused on how to use the JAI Library, as all the tutorials I found contain deprecated methods. 
&lt;br&gt;&lt;br&gt;So my questions:
&lt;br&gt;- is JAI the library I should use or is there anything better out there (did not find anything)
&lt;br&gt;- what influence does the resolution of the image have on the speed loading it and working on it
&lt;br&gt;&amp;nbsp;(due to treatment of high resolution OCR images, I imagine it could help scaling the picture down before displaying it)
&lt;br&gt;- any further hint on how to load images that size and do the scrolling / marking would be great.
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;[Message sent by forum member 'jahuudi' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=373125&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=373125&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498015&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498015&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Display-large-tif-image-and-scroll-around-tp26498015p26498015.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26466028</id>
	<title>Re: how to battle the players in the game?</title>
	<published>2009-11-22T07:05:57Z</published>
	<updated>2009-11-22T07:05:57Z</updated>
	<author>
		<name>Rafael Santos-2</name>
	</author>
	<content type="html">You'll need a Motivator -- it is an interface similar to Iterator, but 
&lt;br&gt;you can use it to move in all directions, including off the code, and 
&lt;br&gt;Iterator only works in one direction.
&lt;br&gt;&lt;br&gt;Google for javax.jai.imageprocessing.notrobots.nothomework.Motivator.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; import javax.swing.JOptionPane;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; public class MainGamev1 {
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; static KaraKter [] kararray=new KaraKter[6];
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; static int karakterCount=0;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; static Maze m = new Maze(10);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; static Dice initpos = new Dice (10);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; static Dice movex=new Dice (6);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; static Dice movey=new Dice (6);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; public static void main (String args[]){
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; boolean addMore= true;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; while(addMore) {
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; newKaraKter();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; String c= JOptionPane.showInputDialog(&amp;quot;Add Another?(y/n)&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; if (c.equalsIgnoreCase(&amp;quot;n&amp;quot;)) addMore= false;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; printMap();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; int plyrturn=0;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; while (true){
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; JOptionPane.showMessageDialog(null,kararray[plyrturn].name+ &amp;quot; s turn &amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=' ';
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; kararray[plyrturn].xpos= movex.roll();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; kararray[plyrturn].ypos= movey.roll();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=kararray[plyrturn].symbol;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; plyrturn++;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; if (plyrturn&amp;gt;=karakterCount) plyrturn=0;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; printMap();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; doBattle();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; public static void printMap(){
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; System.out.println(&amp;quot;---------------------------------&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; for (int x=0; x&amp;lt;10; x++){
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; System.out.println(m.maze[x][0]+&amp;quot; | &amp;quot;+m.maze[x][1]+&amp;quot; | &amp;quot;+m.maze[x][2]+&amp;quot; | &amp;quot;+m.maze[x][3]+&amp;quot; | &amp;quot;+m.maze[x][4]+&amp;quot; | &amp;quot;+m.maze[x][5]+&amp;quot; | &amp;quot;+m.maze[x][6]+&amp;quot; | &amp;quot;+m.maze[x][7]+&amp;quot; | &amp;quot;+m.maze[x][8]+&amp;quot; | &amp;quot;+m.maze[x][9]+&amp;quot; | &amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; System.out.println(&amp;quot;---------------------------------&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; public static void newKaraKter(){
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; if (karakterCount&amp;gt;5) JOptionPane.showMessageDialog(null, &amp;quot;Karakter capacity exceeded&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; else {
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; kararray[karakterCount] = new KaraKter(JOptionPane.showInputDialog(&amp;quot;Enter the challenger: &amp;quot;), Integer.parseInt(JOptionPane.showInputDialog(&amp;quot;Enter your kind: \n 1. Homo Sapien\n 2.Homo Alien\n 3. Super Goo\n 4. Enkantado\n &amp;quot;))-1);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; while(m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]!=' '){
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; kararray[karakterCount].xpos=initpos.roll();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; kararray[karakterCount].ypos=initpos.roll();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]=kararray[karakterCount].symbol;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; karakterCount++;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; public static void doBattle(){
&lt;br&gt;&amp;gt; [Message sent by forum member 'allanp680' ]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=372845&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=372845&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466028&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466028&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466028&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466028&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pls-complete-this-program%2Cin-the-doBattle-has-a-incomplete-codes-tp26418873p26466028.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26464319</id>
	<title>how to battle the players in the game?</title>
	<published>2009-11-22T03:06:51Z</published>
	<updated>2009-11-22T03:06:51Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">import javax.swing.JOptionPane;
&lt;br&gt;&lt;br&gt;public class MainGamev1 {
&lt;br&gt;&lt;br&gt;static KaraKter [] kararray=new KaraKter[6];
&lt;br&gt;&lt;br&gt;static int karakterCount=0;
&lt;br&gt;&lt;br&gt;static Maze m = new Maze(10);
&lt;br&gt;&lt;br&gt;static Dice initpos = new Dice (10);
&lt;br&gt;&lt;br&gt;static Dice movex=new Dice (6);
&lt;br&gt;&lt;br&gt;static Dice movey=new Dice (6);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;public static void main (String args[]){
&lt;br&gt;&lt;br&gt;boolean addMore= true;
&lt;br&gt;&lt;br&gt;while(addMore) {
&lt;br&gt;&lt;br&gt;newKaraKter();
&lt;br&gt;&lt;br&gt;String c= JOptionPane.showInputDialog(&amp;quot;Add Another?(y/n)&amp;quot;);
&lt;br&gt;&lt;br&gt;if (c.equalsIgnoreCase(&amp;quot;n&amp;quot;)) addMore= false;
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;printMap();
&lt;br&gt;&lt;br&gt;int plyrturn=0;
&lt;br&gt;&lt;br&gt;while (true){
&lt;br&gt;&lt;br&gt;JOptionPane.showMessageDialog(null,kararray[plyrturn].name+ &amp;quot; s turn &amp;quot;);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=' ';
&lt;br&gt;&lt;br&gt;kararray[plyrturn].xpos= movex.roll();
&lt;br&gt;&lt;br&gt;kararray[plyrturn].ypos= movey.roll();
&lt;br&gt;&lt;br&gt;m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=kararray[plyrturn].symbol;
&lt;br&gt;&lt;br&gt;plyrturn++;
&lt;br&gt;&lt;br&gt;if (plyrturn&amp;gt;=karakterCount) plyrturn=0;
&lt;br&gt;&lt;br&gt;printMap();
&lt;br&gt;&lt;br&gt;doBattle();
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;public static void printMap(){
&lt;br&gt;&lt;br&gt;System.out.println(&amp;quot;---------------------------------&amp;quot;);
&lt;br&gt;&lt;br&gt;for (int x=0; x&amp;lt;10; x++){
&lt;br&gt;&lt;br&gt;System.out.println(m.maze[x][0]+&amp;quot; | &amp;quot;+m.maze[x][1]+&amp;quot; | &amp;quot;+m.maze[x][2]+&amp;quot; | &amp;quot;+m.maze[x][3]+&amp;quot; | &amp;quot;+m.maze[x][4]+&amp;quot; | &amp;quot;+m.maze[x][5]+&amp;quot; | &amp;quot;+m.maze[x][6]+&amp;quot; | &amp;quot;+m.maze[x][7]+&amp;quot; | &amp;quot;+m.maze[x][8]+&amp;quot; | &amp;quot;+m.maze[x][9]+&amp;quot; | &amp;quot;);
&lt;br&gt;&lt;br&gt;System.out.println(&amp;quot;---------------------------------&amp;quot;);
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;public static void newKaraKter(){
&lt;br&gt;&lt;br&gt;if (karakterCount&amp;gt;5) JOptionPane.showMessageDialog(null, &amp;quot;Karakter capacity exceeded&amp;quot;);
&lt;br&gt;&lt;br&gt;else {
&lt;br&gt;&lt;br&gt;kararray[karakterCount] = new KaraKter(JOptionPane.showInputDialog(&amp;quot;Enter the challenger: &amp;quot;), Integer.parseInt(JOptionPane.showInputDialog(&amp;quot;Enter your kind: \n 1. Homo Sapien\n 2.Homo Alien\n 3. Super Goo\n 4. Enkantado\n &amp;quot;))-1);
&lt;br&gt;&lt;br&gt;while(m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]!=' '){
&lt;br&gt;&lt;br&gt;kararray[karakterCount].xpos=initpos.roll();
&lt;br&gt;&lt;br&gt;kararray[karakterCount].ypos=initpos.roll();
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]=kararray[karakterCount].symbol;
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;karakterCount++;
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;public static void doBattle(){
&lt;br&gt;[Message sent by forum member 'allanp680' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=372845&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=372845&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26464319&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26464319&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pls-complete-this-program%2Cin-the-doBattle-has-a-incomplete-codes-tp26418873p26464319.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26441245</id>
	<title>Re: pls complete this program,in the doBattle has a incomplete  codes</title>
	<published>2009-11-20T02:39:09Z</published>
	<updated>2009-11-20T02:39:09Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">ThANKz BRO
&lt;br&gt;[Message sent by forum member 'allanp680' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=372634&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=372634&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26441245&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26441245&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pls-complete-this-program%2Cin-the-doBattle-has-a-incomplete-codes-tp26418873p26441245.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26426508</id>
	<title>RE: pls complete this program,in the doBattle has a incomplete codes</title>
	<published>2009-11-19T05:43:48Z</published>
	<updated>2009-11-19T05:43:48Z</updated>
	<author>
		<name>Nidel, Mike</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=utf-8&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;
color:windowtext'&gt;Rafael,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;
color:windowtext'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;
color:windowtext'&gt;I think you have a digit wrong. Please check your math.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;
color:windowtext'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-313.599191650329032654553884640336036682129&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;should
be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-313.599191650329032654553884640336035682129&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;;-)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Mike&lt;/span&gt;&lt;/code&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:windowtext'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;
color:windowtext'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
color:windowtext'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:
&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext'&gt; Rafael Santos
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426508&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rafael.santos@...&lt;/a&gt;] &lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Wednesday, November 18, 2009 10:11 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426508&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [JAI] pls complete this program,in the doBattle has a
incomplete codes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Boy, I *love* those!&lt;br&gt;
&lt;br&gt;
All you need to add is an instance of the Solver class:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;public&lt;/span&gt;&lt;/b&gt; &lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;class&lt;/span&gt;&lt;/b&gt; Solver &lt;/code&gt;&lt;code&gt;&lt;span style='color:
navy'&gt;{&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;static&lt;/span&gt;&lt;/b&gt; &lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;char&lt;/span&gt;&lt;/b&gt; P(&lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;int&lt;/span&gt;&lt;/b&gt; x) &lt;/code&gt;&lt;code&gt;&lt;span style='color:navy'&gt;{&lt;/span&gt; &lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;return&lt;/span&gt;&lt;/b&gt; (&lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;char&lt;/span&gt;&lt;/b&gt;) (72.5                  &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( 17488.5893190143069659825414419174194335938               &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( -54923.96120078334934078156948089599609375        &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( 72666.967918019494391046464443206787109375        &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( -54398.9747932198733906261622905731201171875              &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( 25980.9552212852504453621804714202880859375               &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( -8426.37914599867326614912599325180053710938              &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( 1921.50903346147470074356533586978912353516               &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( -313.599191650329032654553884640336036682129              &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( 36.7992157531415244875461212359368801116943               &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( -3.07878165647045820563221241172868758440018              &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( 0.179135367188752586686817380723368842154741              &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( -0.00688508034211159428150672567880974384024739   &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( 0.000157099121942871932430113579570729598344769   &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;+ (x) * ( -1.61094004099956588328874419746572499434478e-06  &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;)))))))))))))));&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style='color:navy'&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;public&lt;/span&gt;&lt;/b&gt; &lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;static&lt;/span&gt;&lt;/b&gt; &lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;void&lt;/span&gt;&lt;/b&gt; solve() &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style='color:navy'&gt;{&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;       &lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;int&lt;/span&gt;&lt;/b&gt; i,c; &lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;for&lt;/span&gt;&lt;/b&gt;(i=0;(c=P(i))!=0;i++) System.out.print((&lt;/code&gt;&lt;code&gt;&lt;b&gt;&lt;span style='color:navy'&gt;char&lt;/span&gt;&lt;/b&gt;)c); &lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style='color:navy'&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style='color:navy'&gt;}&lt;/span&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;pre&gt;import javax.swing.JOptionPane;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;public class MainGamev1 {&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;static KaraKter [] kararray=new KaraKter[6];&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;static int karakterCount=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;static Maze m = new Maze(10);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;static Dice initpos = new Dice (10);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;static Dice movex=new Dice (6);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;static Dice movey=new Dice (6);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;public static void main (String args[]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;boolean addMore= true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;while(addMore) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;newKaraKter();&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;String c= JOptionPane.showInputDialog(&amp;quot;Add Another?(y/n)&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;if (c.equalsIgnoreCase(&amp;quot;n&amp;quot;)) addMore= false;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;printMap();&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;int plyrturn=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;while (true){&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;JOptionPane.showMessageDialog(null,kararray[plyrturn].name+ &amp;quot; s turn &amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=' ';&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;kararray[plyrturn].xpos= movex.roll();&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;kararray[plyrturn].ypos= movey.roll();&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=kararray[plyrturn].symbol;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;plyrturn++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;if (plyrturn&amp;gt;=karakterCount) plyrturn=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;printMap();&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;doBattle();&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;public static void printMap(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;System.out.println(&amp;quot;---------------------------------&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;for (int x=0; x&amp;lt;10; x++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;System.out.println(m.maze[x][0]+&amp;quot; | &amp;quot;+m.maze[x][1]+&amp;quot; | &amp;quot;+m.maze[x][2]+&amp;quot; | &amp;quot;+m.maze[x][3]+&amp;quot; | &amp;quot;+m.maze[x][4]+&amp;quot; | &amp;quot;+m.maze[x][5]+&amp;quot; | &amp;quot;+m.maze[x][6]+&amp;quot; | &amp;quot;+m.maze[x][7]+&amp;quot; | &amp;quot;+m.maze[x][8]+&amp;quot; | &amp;quot;+m.maze[x][9]+&amp;quot; | &amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;System.out.println(&amp;quot;---------------------------------&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;public static void newKaraKter(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;if (karakterCount&amp;gt;5) JOptionPane.showMessageDialog(null, &amp;quot;Karakter capacity exceeded&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;kararray[karakterCount] = new KaraKter(JOptionPane.showInputDialog(&amp;quot;Enter the challenger: &amp;quot;), Integer.parseInt(JOptionPane.showInputDialog(&amp;quot;Enter your kind: \n 1. Homo Sapien\n 2.Homo Alien\n 3. Super Goo\n 4. Enkantado\n &amp;quot;))-1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;while(m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]!=' '){&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;kararray[karakterCount].xpos=initpos.roll();&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;kararray[karakterCount].ypos=initpos.roll();&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]=kararray[karakterCount].symbol;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;karakterCount++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;public static void doBattle(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;KaraKter char1=new KaraKter(&amp;quot;Player1&amp;quot;,1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;KaraKter char2=new KaraKter(&amp;quot;Player2&amp;quot;,2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;JOptionPane.showMessageDialog(null,&amp;quot;Player 1 Info:&amp;quot;+&amp;quot;\nName: &amp;quot;+ char1.name+ &amp;quot;\nRace: &amp;quot;+ char1.name + &amp;quot;\nRace Decription :+&amp;quot;+ char1.raceDescription+ &amp;quot;\n life=100&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;JOptionPane.showMessageDialog(null,&amp;quot;Player 2 Info:&amp;quot;+&amp;quot;\nName: &amp;quot;+ char2.name+ &amp;quot;\nRace: &amp;quot;+ char2.name + &amp;quot;\nRace Decription :+&amp;quot;+ char2.raceDescription + &amp;quot;\n life=100&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;int life1=char1.life;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;int life2=char2.life;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;int damage1=char1.damage , damage2=char2.damage;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;JOptionPane.showMessageDialog(null, &amp;quot;PLayer 1 attacks player 2 for &amp;quot;+char1.damage + &amp;quot;\n Player 2 life down to &amp;quot; + life1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;JOptionPane.showMessageDialog(null, &amp;quot;PLayer 2 attacks player 1 for &amp;quot;+char2.damage + &amp;quot;\n Player 1 life down to &amp;quot; + life2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;[Message sent by forum member 'allanp680' ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=372449&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=372449&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;---------------------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426508&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426508&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;  &lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pls-complete-this-program%2Cin-the-doBattle-has-a-incomplete-codes-tp26418873p26426508.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26419716</id>
	<title>Re: pls complete this program,in the doBattle has a incomplete codes</title>
	<published>2009-11-18T19:10:40Z</published>
	<updated>2009-11-18T19:10:40Z</updated>
	<author>
		<name>Rafael Santos-2</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=UTF-8&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
Boy, I *love* those!&lt;br&gt;
&lt;br&gt;
All you need to add is an instance of the Solver class:&lt;br&gt;
&lt;br&gt;
 &lt;br&gt;
&lt;pre class=&quot;jive-pre&quot;&gt;&lt;code class=&quot;jive-code jive-java&quot;&gt;&lt;font color=&quot;navy&quot;&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;navy&quot;&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Solver &lt;font color=&quot;navy&quot;&gt;{&lt;/font&gt;
&lt;font color=&quot;navy&quot;&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;navy&quot;&gt;&lt;b&gt;char&lt;/b&gt;&lt;/font&gt; P(&lt;font color=&quot;navy&quot;&gt;&lt;b&gt;int&lt;/b&gt;&lt;/font&gt; x) &lt;font color=&quot;navy&quot;&gt;{&lt;/font&gt; &lt;font color=&quot;navy&quot;&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; (&lt;font color=&quot;navy&quot;&gt;&lt;b&gt;char&lt;/b&gt;&lt;/font&gt;) (72.5			
+ (x) * ( 17488.5893190143069659825414419174194335938		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( -54923.96120078334934078156948089599609375		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( 72666.967918019494391046464443206787109375		
+ (x) * ( -54398.9747932198733906261622905731201171875		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( 25980.9552212852504453621804714202880859375		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( -8426.37914599867326614912599325180053710938		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( 1921.50903346147470074356533586978912353516		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( -313.599191650329032654553884640336036682129		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( 36.7992157531415244875461212359368801116943		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( -3.07878165647045820563221241172868758440018		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( 0.179135367188752586686817380723368842154741		&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( -0.00688508034211159428150672567880974384024739	&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( 0.000157099121942871932430113579570729598344769	&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
+ (x) * ( -1.61094004099956588328874419746572499434478e-06	&lt;font color=&quot;darkgreen&quot;&gt;&lt;/font&gt;
)))))))))))))));
&lt;font color=&quot;navy&quot;&gt;}&lt;/font&gt;
&lt;font color=&quot;navy&quot;&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;navy&quot;&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;navy&quot;&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; solve() 
&lt;font color=&quot;navy&quot;&gt;{&lt;/font&gt; 
	&lt;font color=&quot;navy&quot;&gt;&lt;b&gt;int&lt;/b&gt;&lt;/font&gt; i,c; &lt;font color=&quot;navy&quot;&gt;&lt;b&gt;for&lt;/b&gt;&lt;/font&gt;(i=0;(c=P(i))!=0;i++) System.out.print((&lt;font color=&quot;navy&quot;&gt;&lt;b&gt;char&lt;/b&gt;&lt;/font&gt;)c); 
&lt;font color=&quot;navy&quot;&gt;}&lt;/font&gt;
&lt;font color=&quot;navy&quot;&gt;}&lt;/font&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;blockquote cite=&quot;mid:953207152.44611258593880452.JavaMail.tomcat@djnweb1.sjc.collab.net&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;import javax.swing.JOptionPane;
public class MainGamev1 {
static KaraKter [] kararray=new KaraKter[6];
static int karakterCount=0;
static Maze m = new Maze(10);
static Dice initpos = new Dice (10);
static Dice movex=new Dice (6);
static Dice movey=new Dice (6);

public static void main (String args[]){
boolean addMore= true;
while(addMore) {
newKaraKter();
String c= JOptionPane.showInputDialog(&quot;Add Another?(y/n)&quot;);
if (c.equalsIgnoreCase(&quot;n&quot;)) addMore= false;
}
printMap();
int plyrturn=0;
while (true){
JOptionPane.showMessageDialog(null,kararray[plyrturn].name+ &quot; s turn &quot;);

m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=' ';
kararray[plyrturn].xpos= movex.roll();
kararray[plyrturn].ypos= movey.roll();
m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=kararray[plyrturn].symbol;
plyrturn++;
if (plyrturn&amp;gt;=karakterCount) plyrturn=0;
printMap();
doBattle();
}
}
public static void printMap(){
System.out.println(&quot;---------------------------------&quot;);
for (int x=0; x&amp;lt;10; x++){
System.out.println(m.maze[x][0]+&quot; | &quot;+m.maze[x][1]+&quot; | &quot;+m.maze[x][2]+&quot; | &quot;+m.maze[x][3]+&quot; | &quot;+m.maze[x][4]+&quot; | &quot;+m.maze[x][5]+&quot; | &quot;+m.maze[x][6]+&quot; | &quot;+m.maze[x][7]+&quot; | &quot;+m.maze[x][8]+&quot; | &quot;+m.maze[x][9]+&quot; | &quot;);
System.out.println(&quot;---------------------------------&quot;);
}
}
public static void newKaraKter(){
if (karakterCount&amp;gt;5) JOptionPane.showMessageDialog(null, &quot;Karakter capacity exceeded&quot;);
else {
kararray[karakterCount] = new KaraKter(JOptionPane.showInputDialog(&quot;Enter the challenger: &quot;), Integer.parseInt(JOptionPane.showInputDialog(&quot;Enter your kind: \n 1. Homo Sapien\n 2.Homo Alien\n 3. Super Goo\n 4. Enkantado\n &quot;))-1);
while(m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]!=' '){
kararray[karakterCount].xpos=initpos.roll();
kararray[karakterCount].ypos=initpos.roll();


}
m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]=kararray[karakterCount].symbol;
} 
karakterCount++;
}


public static void doBattle(){

KaraKter char1=new KaraKter(&quot;Player1&quot;,1);
KaraKter char2=new KaraKter(&quot;Player2&quot;,2);

JOptionPane.showMessageDialog(null,&quot;Player 1 Info:&quot;+&quot;\nName: &quot;+ char1.name+ &quot;\nRace: &quot;+ char1.name + &quot;\nRace Decription :+&quot;+ char1.raceDescription+ &quot;\n life=100&quot;);
JOptionPane.showMessageDialog(null,&quot;Player 2 Info:&quot;+&quot;\nName: &quot;+ char2.name+ &quot;\nRace: &quot;+ char2.name + &quot;\nRace Decription :+&quot;+ char2.raceDescription + &quot;\n life=100&quot;);


int life1=char1.life;
int life2=char2.life;


int damage1=char1.damage , damage2=char2.damage;
JOptionPane.showMessageDialog(null, &quot;PLayer 1 attacks player 2 for &quot;+char1.damage + &quot;\n Player 2 life down to &quot; + life1);
JOptionPane.showMessageDialog(null, &quot;PLayer 2 attacks player 1 for &quot;+char2.damage + &quot;\n Player 1 life down to &quot; + life2);

}
}
[Message sent by forum member 'allanp680' ]

&lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://forums.java.net/jive/thread.jspa?messageID=372449&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=372449&lt;/a&gt;

---------------------------------------------------------------------
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419716&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419716&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;


  &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pls-complete-this-program%2Cin-the-doBattle-has-a-incomplete-codes-tp26418873p26419716.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26418873</id>
	<title>pls complete this program,in the doBattle has a incomplete codes</title>
	<published>2009-11-18T17:24:10Z</published>
	<updated>2009-11-18T17:24:10Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">import javax.swing.JOptionPane;
&lt;br&gt;public class MainGamev1 {
&lt;br&gt;static KaraKter [] kararray=new KaraKter[6];
&lt;br&gt;static int karakterCount=0;
&lt;br&gt;static Maze m = new Maze(10);
&lt;br&gt;static Dice initpos = new Dice (10);
&lt;br&gt;static Dice movex=new Dice (6);
&lt;br&gt;static Dice movey=new Dice (6);
&lt;br&gt;&lt;br&gt;public static void main (String args[]){
&lt;br&gt;boolean addMore= true;
&lt;br&gt;while(addMore) {
&lt;br&gt;newKaraKter();
&lt;br&gt;String c= JOptionPane.showInputDialog(&amp;quot;Add Another?(y/n)&amp;quot;);
&lt;br&gt;if (c.equalsIgnoreCase(&amp;quot;n&amp;quot;)) addMore= false;
&lt;br&gt;}
&lt;br&gt;printMap();
&lt;br&gt;int plyrturn=0;
&lt;br&gt;while (true){
&lt;br&gt;JOptionPane.showMessageDialog(null,kararray[plyrturn].name+ &amp;quot; s turn &amp;quot;);
&lt;br&gt;&lt;br&gt;m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=' ';
&lt;br&gt;kararray[plyrturn].xpos= movex.roll();
&lt;br&gt;kararray[plyrturn].ypos= movey.roll();
&lt;br&gt;m.maze[kararray[plyrturn].xpos][kararray[plyrturn].ypos]=kararray[plyrturn].symbol;
&lt;br&gt;plyrturn++;
&lt;br&gt;if (plyrturn&amp;gt;=karakterCount) plyrturn=0;
&lt;br&gt;printMap();
&lt;br&gt;doBattle();
&lt;br&gt;}
&lt;br&gt;}
&lt;br&gt;public static void printMap(){
&lt;br&gt;System.out.println(&amp;quot;---------------------------------&amp;quot;);
&lt;br&gt;for (int x=0; x&amp;lt;10; x++){
&lt;br&gt;System.out.println(m.maze[x][0]+&amp;quot; | &amp;quot;+m.maze[x][1]+&amp;quot; | &amp;quot;+m.maze[x][2]+&amp;quot; | &amp;quot;+m.maze[x][3]+&amp;quot; | &amp;quot;+m.maze[x][4]+&amp;quot; | &amp;quot;+m.maze[x][5]+&amp;quot; | &amp;quot;+m.maze[x][6]+&amp;quot; | &amp;quot;+m.maze[x][7]+&amp;quot; | &amp;quot;+m.maze[x][8]+&amp;quot; | &amp;quot;+m.maze[x][9]+&amp;quot; | &amp;quot;);
&lt;br&gt;System.out.println(&amp;quot;---------------------------------&amp;quot;);
&lt;br&gt;}
&lt;br&gt;}
&lt;br&gt;public static void newKaraKter(){
&lt;br&gt;if (karakterCount&amp;gt;5) JOptionPane.showMessageDialog(null, &amp;quot;Karakter capacity exceeded&amp;quot;);
&lt;br&gt;else {
&lt;br&gt;kararray[karakterCount] = new KaraKter(JOptionPane.showInputDialog(&amp;quot;Enter the challenger: &amp;quot;), Integer.parseInt(JOptionPane.showInputDialog(&amp;quot;Enter your kind: \n 1. Homo Sapien\n 2.Homo Alien\n 3. Super Goo\n 4. Enkantado\n &amp;quot;))-1);
&lt;br&gt;while(m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]!=' '){
&lt;br&gt;kararray[karakterCount].xpos=initpos.roll();
&lt;br&gt;kararray[karakterCount].ypos=initpos.roll();
&lt;br&gt;&lt;br&gt;&lt;br&gt;}
&lt;br&gt;m.maze[kararray[karakterCount].xpos][kararray[karakterCount].ypos]=kararray[karakterCount].symbol;
&lt;br&gt;} 
&lt;br&gt;karakterCount++;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;public static void doBattle(){
&lt;br&gt;&lt;br&gt;KaraKter char1=new KaraKter(&amp;quot;Player1&amp;quot;,1);
&lt;br&gt;KaraKter char2=new KaraKter(&amp;quot;Player2&amp;quot;,2);
&lt;br&gt;&lt;br&gt;JOptionPane.showMessageDialog(null,&amp;quot;Player 1 Info:&amp;quot;+&amp;quot;\nName: &amp;quot;+ char1.name+ &amp;quot;\nRace: &amp;quot;+ char1.name + &amp;quot;\nRace Decription :+&amp;quot;+ char1.raceDescription+ &amp;quot;\n life=100&amp;quot;);
&lt;br&gt;JOptionPane.showMessageDialog(null,&amp;quot;Player 2 Info:&amp;quot;+&amp;quot;\nName: &amp;quot;+ char2.name+ &amp;quot;\nRace: &amp;quot;+ char2.name + &amp;quot;\nRace Decription :+&amp;quot;+ char2.raceDescription + &amp;quot;\n life=100&amp;quot;);
&lt;br&gt;&lt;br&gt;&lt;br&gt;int life1=char1.life;
&lt;br&gt;int life2=char2.life;
&lt;br&gt;&lt;br&gt;&lt;br&gt;int damage1=char1.damage , damage2=char2.damage;
&lt;br&gt;JOptionPane.showMessageDialog(null, &amp;quot;PLayer 1 attacks player 2 for &amp;quot;+char1.damage + &amp;quot;\n Player 2 life down to &amp;quot; + life1);
&lt;br&gt;JOptionPane.showMessageDialog(null, &amp;quot;PLayer 2 attacks player 1 for &amp;quot;+char2.damage + &amp;quot;\n Player 1 life down to &amp;quot; + life2);
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;}
&lt;br&gt;[Message sent by forum member 'allanp680' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=372449&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=372449&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26418873&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26418873&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pls-complete-this-program%2Cin-the-doBattle-has-a-incomplete-codes-tp26418873p26418873.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26415926</id>
	<title>Re: Problem  updating displayJAI with  a new image</title>
	<published>2009-11-18T13:16:17Z</published>
	<updated>2009-11-18T13:16:17Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">I would suggest trying
&lt;br&gt;&lt;br&gt;display.revalidate();
&lt;br&gt;or/and
&lt;br&gt;display.repaint();
&lt;br&gt;&lt;br&gt;just at the end of your code.
&lt;br&gt;&lt;br&gt;hope this helps,
&lt;br&gt;helaha
&lt;br&gt;[Message sent by forum member 'helaha' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=372429&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=372429&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26415926&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26415926&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem--updating-displayJAI-with--a-new-image-tp26374020p26415926.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26374020</id>
	<title>Problem  updating displayJAI with  a new image</title>
	<published>2009-11-16T07:36:00Z</published>
	<updated>2009-11-16T07:36:00Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">Hi averyone
&lt;br&gt;Im a JAI newbie and actually &amp;nbsp;i have to develop &amp;nbsp;a a simple image editor &amp;nbsp;wiht JAI &amp;nbsp;well I apply some operator (escale or rotate) to a image so &amp;nbsp;a new planar image is generated and replace the &amp;nbsp;old image by the new one &amp;nbsp;but when this process is repetead several times the display freezes and the scrolls can not move &amp;nbsp;am I doing something wrong?
&lt;br&gt;&lt;br&gt;&amp;nbsp;System.out.println(&amp;quot;evento rotar INI&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long start = System.currentTimeMillis();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float centerX = 0f;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float centerY = 0f;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float angle = (float) Math.toRadians(new Float(jTextField1.getText()));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;centerX = image.getWidth() / 2f;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;centerY = image.getHeight() / 2f;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Rotates the original image.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ParameterBlock pb = new ParameterBlock();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pb.addSource(image);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pb.add(centerX);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pb.add(centerY);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pb.add(angle);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pb.add(new InterpolationBilinear());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Creates a new, rotated image and uses it on the DisplayJAI component
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; RenderedOp rotatedImage = JAI.create(&amp;quot;rotate&amp;quot;, pb,new RenderingHints(JAI.KEY_TILE_CACHE,null));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; this.image=rotatedImage; &amp;nbsp; &amp;nbsp; //update the old image by the new one
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; display.setImage(rotatedImage);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; changed=true;
&lt;br&gt;[Message sent by forum member 'mslozano' ]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=371997&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=371997&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26374020&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26374020&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem--updating-displayJAI-with--a-new-image-tp26374020p26374020.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26262016</id>
	<title>Re: Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-08T23:01:01Z</published>
	<updated>2009-11-08T23:01:01Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">now i use the following code:
&lt;br&gt;&lt;br&gt;import java.awt.*;
&lt;br&gt;import java.awt.event.*;
&lt;br&gt;import java.awt.color.*;
&lt;br&gt;import java.awt.geom.*;
&lt;br&gt;import java.awt.image.*;
&lt;br&gt;import java.awt.image.renderable.*;
&lt;br&gt;import javax.media.jai.*;
&lt;br&gt;import javax.media.jai.widget.*;
&lt;br&gt;&lt;br&gt;public class BandMergeTest extends Frame {
&lt;br&gt;&amp;nbsp; &amp;nbsp; private static int TILE_WIDTH = 128;
&lt;br&gt;&amp;nbsp; &amp;nbsp; private static int TILE_HEIGHT = TILE_WIDTH;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public static void main(String[] args) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(args.length == 0) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Need one or more inputs&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.exit(0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new BandMergeTest(args);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; BandMergeTest(String[] fileNames) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PlanarImage[] src = new PlanarImage[fileNames.length];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Load the images keeping track of the number of bands in each
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // and of the total number of bands.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int numBands = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Rectangle bounds = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int[] bands = new int[fileNames.length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; fileNames.length; i++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; src[i= JAI.create(&amp;quot;fileload&amp;quot;, fileNames[i]);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SampleModel ssm = src[i.getSampleModel();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(ssm.getTransferType() != DataBuffer.TYPE_BYTE) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Accept byte data only&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.exit(0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bands[i = ssm.getNumBands();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; numBands += bands[i;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(bounds == null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds = src[i.getBounds();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds = bounds.intersection(src[i.getBounds());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(bounds.isEmpty()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&amp;quot;Null intersection&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.exit(0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SampleModel sm =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RasterFactory.createPixelInterleavedSampleModel(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataBuffer.TYPE_BYTE,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TILE_WIDTH,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TILE_HEIGHT,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; numBands);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ColorModel cm = PlanarImage.createColorModel(sm);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TiledImage dst = new TiledImage(bounds.x, bounds.y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds.width, bounds.height,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds.x, bounds.y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sm, cm);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int ny = dst.getNumYTiles();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int nx = dst.getNumXTiles();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int ty = 0; ty &amp;lt; ny; ty++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int tx = 0; tx &amp;lt; nx; tx++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WritableRaster parent = dst.getWritableTile(tx, ty);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds = parent.getBounds();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int startBand = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; src.length; i++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int[] bandList = new int[bands[i];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int k = startBand;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int j = 0; j &amp;lt; bands[i; j++ ) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bandList[j = k++;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startBand += bands[i;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WritableRaster child =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; parent.createWritableChild(bounds.x, bounds.y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bounds.width, bounds.height,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bounds.x, bounds.y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bandList);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; child.setRect(src[i.getData(bounds));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dst.releaseWritableTile(tx, ty);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JAI.create(&amp;quot;filestore&amp;quot;,dst,&amp;quot;c:\\cmyk.tif&amp;quot;,&amp;quot;TIFF&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; File out=new File(&amp;quot;c:\\cmyk2.jpg&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;dst:&amp;quot;+dst);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ImageIO.write(dst, &amp;quot;jpg&amp;quot;, out );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }catch(IOException e){}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; add(new ScrollingImagePanel(dst, 640, 480));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; addWindowListener(new WindowAdapter() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void windowClosing(WindowEvent e) { System.exit(0); }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pack();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show();
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;the image in the frame poped up displayed with right color, but the tiff,jpeg or png saved just displayed a whole page white. its quite odd. can anybody analyse this?
&lt;br&gt;[Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262016&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=371114&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=371114&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262016&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262016&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26262016.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26261936</id>
	<title>Re: Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-08T22:48:24Z</published>
	<updated>2009-11-08T22:48:24Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">now i use the following code:
&lt;br&gt;&lt;br&gt;&lt;br&gt;import java.awt.*;
&lt;br&gt;import java.awt.event.*;
&lt;br&gt;import java.awt.color.*;
&lt;br&gt;import java.awt.geom.*;
&lt;br&gt;import java.awt.image.*;
&lt;br&gt;import java.awt.image.renderable.*;
&lt;br&gt;import javax.media.jai.*;
&lt;br&gt;import javax.media.jai.widget.*;
&lt;br&gt;&lt;br&gt;public class BandMergeTest extends Frame {
&lt;br&gt;&amp;nbsp; &amp;nbsp; private static int TILE_WIDTH = 128;
&lt;br&gt;&amp;nbsp; &amp;nbsp; private static int TILE_HEIGHT = TILE_WIDTH;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public static void main(String[] args) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(args.length == 0) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Need one or more inputs&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.exit(0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new BandMergeTest(args);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; BandMergeTest(String[] fileNames) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PlanarImage[] src = new PlanarImage[fileNames.length];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Load the images keeping track of the number of bands in each
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // and of the total number of bands.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int numBands = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Rectangle bounds = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int[] bands = new int[fileNames.length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; fileNames.length; i++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; src[i] = JAI.create(&amp;quot;fileload&amp;quot;, fileNames[i]);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SampleModel ssm = src[i].getSampleModel();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(ssm.getTransferType() != DataBuffer.TYPE_BYTE) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Accept byte data only&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.exit(0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bands[i] = ssm.getNumBands();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; numBands += bands[i];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(bounds == null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds = src[i].getBounds();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds = bounds.intersection(src[i].getBounds());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(bounds.isEmpty()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&amp;quot;Null intersection&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.exit(0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create a SampleModel appropriate for the total number of bands,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // a ColorModel appropriate for this SampleMode,l and using these
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // objects create a TiledImage of the intersected area.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SampleModel sm =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RasterFactory.createPixelInterleavedSampleModel(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataBuffer.TYPE_BYTE,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TILE_WIDTH,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TILE_HEIGHT,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; numBands);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ColorModel cm = PlanarImage.createColorModel(sm);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TiledImage dst = new TiledImage(bounds.x, bounds.y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds.width, bounds.height,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds.x, bounds.y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sm, cm);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Loop over the tiles of the TiledImage. For each tile create a band
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // child and insert the data of the appropriate source image into
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // the tile.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int ny = dst.getNumYTiles();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int nx = dst.getNumXTiles();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int ty = 0; ty &amp;lt; ny; ty++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int tx = 0; tx &amp;lt; nx; tx++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WritableRaster parent = dst.getWritableTile(tx, ty);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bounds = parent.getBounds();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int startBand = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; src.length; i++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int[] bandList = new int[bands[i]];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int k = startBand;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int j = 0; j &amp;lt; bands[i]; j++ ) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bandList[j] = k++;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startBand += bands[i];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WritableRaster child =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; parent.createWritableChild(bounds.x, bounds.y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bounds.width, bounds.height,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bounds.x, bounds.y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bandList);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; child.setRect(src[i].getData(bounds));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dst.releaseWritableTile(tx, ty);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JAI.create(&amp;quot;filestore&amp;quot;,dst,&amp;quot;c:\\cmyk.tif&amp;quot;,&amp;quot;TIFF&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Display the result.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; add(new ScrollingImagePanel(dst, 640, 480));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; addWindowListener(new WindowAdapter() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void windowClosing(WindowEvent e) { System.exit(0); }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pack();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show();
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;the frame pop up can show the cmyk merged image with right color, but the tiff file,jpg, or png saved display a whole page white, its an odd case. can anybody analyse this?
&lt;br&gt;[Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261936&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=371112&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=371112&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261936&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261936&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26261936.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26251480</id>
	<title>Re: Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-07T23:23:55Z</published>
	<updated>2009-11-07T23:23:55Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">now i log the colormodel and numband of the image and i found that the colormodel is null, and the numband is 12,though i just merge four 1 band image, and i 've set colormodel. does any body help me?
&lt;br&gt;[Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26251480&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=371048&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=371048&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26251480&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26251480&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26251480.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26235467</id>
	<title>Re: Encode true color PNG into an indexed PNG</title>
	<published>2009-11-06T20:13:49Z</published>
	<updated>2009-11-06T20:13:49Z</updated>
	<author>
		<name>jbmdharris</name>
	</author>
	<content type="html">Has anyone else figured out how to do this? &amp;nbsp;I'm trying to figure it out myself as well.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;jai-interest-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;You have to pass image that has exactly 3 bands (RGB, not RGBA)
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
So, what I've figured out so far is this:
&lt;br&gt;&lt;br&gt;1. You have to convert your input image first to RGBA if it isn't already &amp;nbsp;(like if the input is a GIF instead of 24-bit PNG with alpha channel.)
&lt;br&gt;2. Then you separate the RGB bands into a single image, and the alpha band into another image.
&lt;br&gt;3. Then you have to cleanup in the RGB bands using a series of logical operations using the separate alpha channel because random colors may be hidden by the opacity of 0.
&lt;br&gt;&lt;br&gt;At this point, you're ready to quantize the RGB bands... but then what do you do with the alpha channel? &amp;nbsp;How do you know how many palette entries to keep for partially transparent colors vs. fully opaque ones? &amp;nbsp;For example, I can quantize the RGB bands down to 128 colors preserving the other 128 colors for partially transparent ones... but how do I quantize the alpha channel down and apply that back to the original image updating the palette indexes in the process... without combining the band back into the image?
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Encode-true-color-PNG-into-an-indexed-PNG-tp15908759p26235467.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26217536</id>
	<title>Re: Background Subtraction</title>
	<published>2009-11-05T08:06:21Z</published>
	<updated>2009-11-05T08:06:21Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">Try this 
&lt;br&gt;&lt;br&gt;Let say u have 2 image..... which is img1 and img2..
&lt;br&gt;first call the function img 3 = subtractImage(img1 , img2 ) &amp;nbsp;then swap the parameter place img4 = subtractImage(img2, img1) now add both the images.
&lt;br&gt;&lt;br&gt;private BufferedImage subtractImage(BufferedImage img1, BufferedImage img2) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage imageOut;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RenderedOp op = SubtractDescriptor.create(img1, img2, null);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imageOut = op.getAsBufferedImage();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return imageOut;	
&lt;br&gt;}
&lt;br&gt;[Message sent by forum member 'servantprint' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26217536&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shadow_prinz@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370699&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370699&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26217536&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26217536&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Background-Subtraction-tp24596474p26217536.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26212864</id>
	<title>Re: Creating big images</title>
	<published>2009-11-05T03:27:02Z</published>
	<updated>2009-11-05T03:27:02Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">Hello Bob,
&lt;br&gt;&lt;br&gt;I don't need to create it on memory, but I need a raster of this size in order to create the coverage in GeoTools (at least, as far as I know). I think I can use Michael's DiskMemImage to achieve this... I'm currently testing it.
&lt;br&gt;&lt;br&gt;Thanks for your replies.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;César
&lt;br&gt;[Message sent by forum member 'dispiste' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26212864&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cesar.izq@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370669&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370669&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26212864&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26212864&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creating-big-images-tp26131860p26212864.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26209684</id>
	<title>Re: Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-04T22:01:37Z</published>
	<updated>2009-11-04T22:01:37Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">thanks for suggestions, firstly i need to correct that my resulting image is grayscale opened by photoshop. and i 've tried your suggestions, the result image file is the same, for the suggestion c, it returns an nullpointer exception error, but i'm sure the result renderedimage is not null and is passed to the display function.
&lt;br&gt;&lt;br&gt;its strange that the result image is grayscale since i 've created the colorspace as cmyk, with the band number 4. do u know why?
&lt;br&gt;[Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209684&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370607&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370607&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209684&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209684&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26209684.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26201751</id>
	<title>Re: Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-04T10:14:00Z</published>
	<updated>2009-11-04T10:14:00Z</updated>
	<author>
		<name>Bob Deen</name>
	</author>
	<content type="html">I have three suggestions, all in the vein of separating the problems.
&lt;br&gt;&lt;br&gt;a) try a different output file type, for testing (jpeg, png, whatever).
&lt;br&gt;&lt;br&gt;b) use &amp;quot;colorconvert&amp;quot; to take your CMYK-labeled image and convert it to 
&lt;br&gt;the more usual RGB colorspace. &amp;nbsp;Save or display that and see if it works.
&lt;br&gt;&lt;br&gt;c) hook it up to an image display rather than a file output.
&lt;br&gt;&lt;br&gt;Those will help nail down whether it's a problem properly attaching the 
&lt;br&gt;CMYK color model (b) or if the file writer is perhaps not honoring the 
&lt;br&gt;color model (a,c).
&lt;br&gt;&lt;br&gt;Method b is usable in production, if you just want to be able to view 
&lt;br&gt;the file properly and don't actually need it stored in cmyk for some reason.
&lt;br&gt;&lt;br&gt;-Bob
&lt;br&gt;&lt;br&gt;Nidel, Mike wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; First, what happens if you skip the compression?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Second, what happens if instead of the JAI TIFF writer, you use the
&lt;br&gt;&amp;gt; JAI ImageIO tools one?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jai-interest@...&lt;/a&gt; [mailto:jai-
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;]
&lt;br&gt;&amp;gt;&amp;gt; Sent: Wednesday, November 04, 2009 1:33 AM
&lt;br&gt;&amp;gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; Subject: Re: RE: [JAI] Re: merging 4 single band images into one 4-band
&lt;br&gt;&amp;gt;&amp;gt; cmyk image
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; thanks for your reply. now i have modified my code by creating the the
&lt;br&gt;&amp;gt;&amp;gt; colorspace myself, but i can't create cmyk colorspace by using this
&lt;br&gt;&amp;gt;&amp;gt; statement:
&lt;br&gt;&amp;gt;&amp;gt; ColorSpace cc=ColorSpace.getInstance(ColorSpace.TYPE_CMYK); since the
&lt;br&gt;&amp;gt;&amp;gt; getinstance recognise TYPE_CMYK as unknown colorspace. here 's my code:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; SampleModel sm =
&lt;br&gt;&amp;gt;&amp;gt; RasterFactory.createPixelInterleavedSampleModel(
&lt;br&gt;&amp;gt;&amp;gt; DataBuffer.TYPE_BYTE,
&lt;br&gt;&amp;gt;&amp;gt; TILE_WIDTH,
&lt;br&gt;&amp;gt;&amp;gt; TILE_HEIGHT,
&lt;br&gt;&amp;gt;&amp;gt; numBands);
&lt;br&gt;&amp;gt;&amp;gt; ColorModel cm = PlanarImage.createColorModel(sm);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; int[] bits = { 8, 8, 8, 8};
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; try{
&lt;br&gt;&amp;gt;&amp;gt; ICC_Profile profileOutput = ICC_Profile.getInstance(&amp;quot;CMYK.pf&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; cc=new ICC_ColorSpace(profileOutput);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ColorModel colorModel = new ComponentColorModel(cc,
&lt;br&gt;&amp;gt;&amp;gt; bits, false, false,
&lt;br&gt;&amp;gt;&amp;gt; Transparency.OPAQUE,
&lt;br&gt;&amp;gt;&amp;gt; DataBuffer.TYPE_BYTE);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ImageLayout imageLayout = new ImageLayout();
&lt;br&gt;&amp;gt;&amp;gt; imageLayout.setColorModel(colorModel);
&lt;br&gt;&amp;gt;&amp;gt; imageLayout.setSampleModel(sm);
&lt;br&gt;&amp;gt;&amp;gt; RenderingHints rendHints = new
&lt;br&gt;&amp;gt;&amp;gt; RenderingHints(JAI.KEY_IMAGE_LAYOUT,imageLayout);
&lt;br&gt;&amp;gt;&amp;gt; ParameterBlock pb = new ParameterBlock();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; for(int i = 0; i &amp;lt; fileNames.length; i++) {
&lt;br&gt;&amp;gt;&amp;gt; pb.addSource(src[i]);
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; RenderedImage finalImage = JAI.create(&amp;quot;bandmerge&amp;quot;, pb, rendHints);
&lt;br&gt;&amp;gt;&amp;gt; TIFFEncodeParam encodeParam = new TIFFEncodeParam();
&lt;br&gt;&amp;gt;&amp;gt; encodeParam.setCompression(TIFFEncodeParam.COMPRESSION_DEFLATE);
&lt;br&gt;&amp;gt;&amp;gt; JAI.create(&amp;quot;filestore&amp;quot;,finalImage,&amp;quot;c:\\merge.tiff&amp;quot;,&amp;quot;TIFF&amp;quot;,encodeParam);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; the result image is white opened by photoshop. i can't think of ways to
&lt;br&gt;&amp;gt;&amp;gt; solve it, why is that?
&lt;br&gt;&amp;gt;&amp;gt; [Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370422&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370422&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201751&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26201751.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26196687</id>
	<title>RE: RE: Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-04T05:52:43Z</published>
	<updated>2009-11-04T05:52:43Z</updated>
	<author>
		<name>Nidel, Mike</name>
	</author>
	<content type="html">First, what happens if you skip the compression?
&lt;br&gt;&lt;br&gt;Second, what happens if instead of the JAI TIFF writer, you use the
&lt;br&gt;JAI ImageIO tools one?
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196687&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jai-interest@...&lt;/a&gt; [mailto:jai-
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196687&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Wednesday, November 04, 2009 1:33 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196687&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: RE: [JAI] Re: merging 4 single band images into one 4-band
&lt;br&gt;&amp;gt; cmyk image
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; thanks for your reply. now i have modified my code by creating the the
&lt;br&gt;&amp;gt; colorspace myself, but i can't create cmyk colorspace by using this
&lt;br&gt;&amp;gt; statement:
&lt;br&gt;&amp;gt; ColorSpace cc=ColorSpace.getInstance(ColorSpace.TYPE_CMYK); since the
&lt;br&gt;&amp;gt; getinstance recognise TYPE_CMYK as unknown colorspace. here 's my code:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; SampleModel sm =
&lt;br&gt;&amp;gt; RasterFactory.createPixelInterleavedSampleModel(
&lt;br&gt;&amp;gt; DataBuffer.TYPE_BYTE,
&lt;br&gt;&amp;gt; TILE_WIDTH,
&lt;br&gt;&amp;gt; TILE_HEIGHT,
&lt;br&gt;&amp;gt; numBands);
&lt;br&gt;&amp;gt; ColorModel cm = PlanarImage.createColorModel(sm);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; int[] bits = { 8, 8, 8, 8};
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; try{
&lt;br&gt;&amp;gt; ICC_Profile profileOutput = ICC_Profile.getInstance(&amp;quot;CMYK.pf&amp;quot;);
&lt;br&gt;&amp;gt; cc=new ICC_ColorSpace(profileOutput);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ColorModel colorModel = new ComponentColorModel(cc,
&lt;br&gt;&amp;gt; bits, false, false,
&lt;br&gt;&amp;gt; Transparency.OPAQUE,
&lt;br&gt;&amp;gt; DataBuffer.TYPE_BYTE);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ImageLayout imageLayout = new ImageLayout();
&lt;br&gt;&amp;gt; imageLayout.setColorModel(colorModel);
&lt;br&gt;&amp;gt; imageLayout.setSampleModel(sm);
&lt;br&gt;&amp;gt; RenderingHints rendHints = new
&lt;br&gt;&amp;gt; RenderingHints(JAI.KEY_IMAGE_LAYOUT,imageLayout);
&lt;br&gt;&amp;gt; ParameterBlock pb = new ParameterBlock();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; for(int i = 0; i &amp;lt; fileNames.length; i++) {
&lt;br&gt;&amp;gt; pb.addSource(src[i]);
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; RenderedImage finalImage = JAI.create(&amp;quot;bandmerge&amp;quot;, pb, rendHints);
&lt;br&gt;&amp;gt; TIFFEncodeParam encodeParam = new TIFFEncodeParam();
&lt;br&gt;&amp;gt; encodeParam.setCompression(TIFFEncodeParam.COMPRESSION_DEFLATE);
&lt;br&gt;&amp;gt; JAI.create(&amp;quot;filestore&amp;quot;,finalImage,&amp;quot;c:\\merge.tiff&amp;quot;,&amp;quot;TIFF&amp;quot;,encodeParam);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; the result image is white opened by photoshop. i can't think of ways to
&lt;br&gt;&amp;gt; solve it, why is that?
&lt;br&gt;&amp;gt; [Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196687&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370422&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370422&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196687&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196687&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196687&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196687&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26196687.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26191667</id>
	<title>Re: RE: Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-03T22:32:58Z</published>
	<updated>2009-11-03T22:32:58Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">thanks for your reply. now i have modified my code by creating the the colorspace myself, but i can't create cmyk colorspace by using this statement:
&lt;br&gt;ColorSpace cc=ColorSpace.getInstance(ColorSpace.TYPE_CMYK); since the getinstance recognise TYPE_CMYK as unknown colorspace. here 's my code:
&lt;br&gt;&lt;br&gt;SampleModel sm =
&lt;br&gt;RasterFactory.createPixelInterleavedSampleModel(
&lt;br&gt;DataBuffer.TYPE_BYTE,
&lt;br&gt;TILE_WIDTH,
&lt;br&gt;TILE_HEIGHT,
&lt;br&gt;numBands);
&lt;br&gt;ColorModel cm = PlanarImage.createColorModel(sm);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;int[] bits = { 8, 8, 8, 8};
&lt;br&gt;&lt;br&gt;&lt;br&gt;try{
&lt;br&gt;ICC_Profile profileOutput = ICC_Profile.getInstance(&amp;quot;CMYK.pf&amp;quot;);
&lt;br&gt;cc=new ICC_ColorSpace(profileOutput);
&lt;br&gt;&lt;br&gt;&lt;br&gt;ColorModel colorModel = new ComponentColorModel(cc,
&lt;br&gt;bits, false, false,
&lt;br&gt;Transparency.OPAQUE,
&lt;br&gt;DataBuffer.TYPE_BYTE);
&lt;br&gt;&lt;br&gt;&lt;br&gt;ImageLayout imageLayout = new ImageLayout();
&lt;br&gt;imageLayout.setColorModel(colorModel);
&lt;br&gt;imageLayout.setSampleModel(sm);
&lt;br&gt;RenderingHints rendHints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT,imageLayout);
&lt;br&gt;ParameterBlock pb = new ParameterBlock();
&lt;br&gt;&lt;br&gt;&lt;br&gt;for(int i = 0; i &amp;lt; fileNames.length; i++) {
&lt;br&gt;pb.addSource(src[i]);
&lt;br&gt;}
&lt;br&gt;RenderedImage finalImage = JAI.create(&amp;quot;bandmerge&amp;quot;, pb, rendHints);
&lt;br&gt;TIFFEncodeParam encodeParam = new TIFFEncodeParam();
&lt;br&gt;encodeParam.setCompression(TIFFEncodeParam.COMPRESSION_DEFLATE);
&lt;br&gt;JAI.create(&amp;quot;filestore&amp;quot;,finalImage,&amp;quot;c:\\merge.tiff&amp;quot;,&amp;quot;TIFF&amp;quot;,encodeParam);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;the result image is white opened by photoshop. i can't think of ways to solve it, why is that?
&lt;br&gt;[Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26191667&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370422&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370422&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26191667&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26191667&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26191667.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26189058</id>
	<title>new BorderExtender classes</title>
	<published>2009-11-03T16:18:15Z</published>
	<updated>2009-11-03T16:18:15Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">There are two new BorderExtender classes available in the jai-tools project for use with convolution (JAI's standard convolve operator and the jai-tools MaskedConvolve operator).
&lt;br&gt;&lt;br&gt;RandomBorderExtender - extends the image by generating pixel values
&lt;br&gt;drawn from a uniform random distribution with a user-specified range
&lt;br&gt;&lt;br&gt;SamplingBorderExtender - extends the image by randomly sampling the
&lt;br&gt;source image within a specified distance of each border pixel
&lt;br&gt;&lt;br&gt;At the moment they are experimental ( = I only wrote them yesterday) and are in a branch in the source repositoryhttp://jai-tools.googlecode.com/svn/branches/1.1_advance/utils/
&lt;br&gt;&lt;br&gt;The BorderExtender classes are in the jaitools.imageutils package. &amp;nbsp;
&lt;br&gt;&lt;br&gt;There are basic unit tests each BorderExtender as well but I haven't tried using them
&lt;br&gt;in a convolution yet.
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;[Message sent by forum member 'cafeanimal' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26189058&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.bedward@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370401&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370401&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26189058&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26189058&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/new-BorderExtender-classes-tp26189058p26189058.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26188953</id>
	<title>Re: Bicubic or Bilinear interpolation adds magenta tone to scaled down imag</title>
	<published>2009-11-03T16:08:41Z</published>
	<updated>2009-11-03T16:08:41Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">I'm not sure if this is relevant but if you write an image with an alpha band to a JPEG it comes out looking like a martian landscape :) &amp;nbsp;This is because some when viewers see the fourth band in the JPEG they interpret it as a CMYK image and your ARGB data turns reddish. &amp;nbsp;Discard the alpha band and all should be well.
&lt;br&gt;&lt;br&gt;I ran into this problem recently and found the above info here:
&lt;br&gt;&lt;a href=&quot;http://pdf.jpedal.org/java-pdf-blog/bid/11403/Odd-coloured-JPEGs-in-Java-with-ImageIO#Comments&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pdf.jpedal.org/java-pdf-blog/bid/11403/Odd-coloured-JPEGs-in-Java-with-ImageIO#Comments&lt;/a&gt;&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;[Message sent by forum member 'cafeanimal' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26188953&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.bedward@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370400&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370400&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26188953&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26188953&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bicubic-or-Bilinear-interpolation-adds-magenta-tone-to-scaled-down-image-tp12953612p26188953.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26188892</id>
	<title>Re: Creating big images</title>
	<published>2009-11-03T16:02:08Z</published>
	<updated>2009-11-03T16:02:08Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">&amp;lt;shameless-plug&amp;gt;
&lt;br&gt;In addition to Bob's comments, there is also the DiskMemImage class in jai-tools. It's a tiled image that can use supplement memory storage of tiles with disk caching to handle large volumes of data:
&lt;br&gt;&lt;a href=&quot;http://code.google.com/p/jai-tools/wiki/DiskMemImage&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/jai-tools/wiki/DiskMemImage&lt;/a&gt;&lt;br&gt;&amp;lt;/shameless-plug&amp;gt;
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;[Message sent by forum member 'cafeanimal' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26188892&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.bedward@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370398&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370398&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26188892&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26188892&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creating-big-images-tp26131860p26188892.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26180003</id>
	<title>RE: Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-03T05:56:04Z</published>
	<updated>2009-11-03T05:56:04Z</updated>
	<author>
		<name>Nidel, Mike</name>
	</author>
	<content type="html">I think I know your problem.
&lt;br&gt;&lt;br&gt;When you create the 4-band image, you haven't given it any information to
&lt;br&gt;tell it that it's a CMYK image. It could just as easily be RGBA or anything
&lt;br&gt;else.
&lt;br&gt;&lt;br&gt;Here is what I think you want to do: create a ColorModel that corresponds to
&lt;br&gt;your CMYK format, most likely a ComponentColorModel. When you construct it,
&lt;br&gt;pass in the result of ColorSpace.getInstance(ColorSpace.TYPE_CMYK), along
&lt;br&gt;with the other parameters.
&lt;br&gt;&lt;br&gt;Then, when you have the ColorModel built, pass that into an ImageLayout.
&lt;br&gt;Then add the ImageLayout to a new RenderingHints. Finally, pass the
&lt;br&gt;RenderingHints to the call to JAI.create() and that should be it. Then
&lt;br&gt;the TIFF writer should know that it's a CMYK image and write it accordingly.
&lt;br&gt;You could verify this by getting a separate program such as libtiff to
&lt;br&gt;examine the created TIFF file and make sure the metadata is right.
&lt;br&gt;&lt;br&gt;If you need help with any of the details, feel free to ask us on the list.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180003&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jai-interest@...&lt;/a&gt; [mailto:jai-
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180003&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Tuesday, November 03, 2009 4:56 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180003&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [JAI] Re: merging 4 single band images into one 4-band cmyk
&lt;br&gt;&amp;gt; image
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; for using bandmerge op to create image, here is my code:
&lt;br&gt;&amp;gt; String[]
&lt;br&gt;&amp;gt; args={&amp;quot;f:\\tiff\\c.tif&amp;quot;,&amp;quot;f:\\tiff\\m.tif&amp;quot;,&amp;quot;f:\\tiff\\y.tif&amp;quot;,&amp;quot;f:\\tiff\\
&lt;br&gt;&amp;gt; k.tif&amp;quot;};
&lt;br&gt;&amp;gt; PlanarImage[] inputs = new PlanarImage[args.length];
&lt;br&gt;&amp;gt; for(int im=0;im&amp;lt;args.length;im++)
&lt;br&gt;&amp;gt; inputs[im = JAI.create(&amp;quot;fileload&amp;quot;, args[im]);
&lt;br&gt;&amp;gt; ParameterBlock pb = new ParameterBlock();
&lt;br&gt;&amp;gt; for(int im=0;im&amp;lt;args.length;im++)
&lt;br&gt;&amp;gt; pb.setSource(inputs[im], im);
&lt;br&gt;&amp;gt; PlanarImage result = JAI.create(&amp;quot;bandmerge&amp;quot;,pb,null);
&lt;br&gt;&amp;gt; JAI.create(&amp;quot;filestore&amp;quot;,result,&amp;quot;f:\\multiband.tiff&amp;quot;,&amp;quot;TIFF&amp;quot;);
&lt;br&gt;&amp;gt; that's seems reasonable, anything i've missed?
&lt;br&gt;&amp;gt; [Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180003&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370284&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370284&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180003&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180003&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180003&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180003&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26180003.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26177361</id>
	<title>Re: merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-03T01:55:33Z</published>
	<updated>2009-11-03T01:55:33Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">for using bandmerge op to create image, here is my code:
&lt;br&gt;String[] args={&amp;quot;f:\\tiff\\c.tif&amp;quot;,&amp;quot;f:\\tiff\\m.tif&amp;quot;,&amp;quot;f:\\tiff\\y.tif&amp;quot;,&amp;quot;f:\\tiff\\k.tif&amp;quot;}; 
&lt;br&gt;PlanarImage[] inputs = new PlanarImage[args.length]; 
&lt;br&gt;for(int im=0;im&amp;lt;args.length;im++) 
&lt;br&gt;inputs[im = JAI.create(&amp;quot;fileload&amp;quot;, args[im]); 
&lt;br&gt;ParameterBlock pb = new ParameterBlock();
&lt;br&gt;for(int im=0;im&amp;lt;args.length;im++) 
&lt;br&gt;pb.setSource(inputs[im], im);
&lt;br&gt;PlanarImage result = JAI.create(&amp;quot;bandmerge&amp;quot;,pb,null); 
&lt;br&gt;JAI.create(&amp;quot;filestore&amp;quot;,result,&amp;quot;f:\\multiband.tiff&amp;quot;,&amp;quot;TIFF&amp;quot;);
&lt;br&gt;that's seems reasonable, anything i've missed?
&lt;br&gt;[Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26177361&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370284&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370284&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26177361&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26177361&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26177361.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26177316</id>
	<title>merging 4 single band images into one 4-band cmyk image</title>
	<published>2009-11-03T01:52:13Z</published>
	<updated>2009-11-03T01:52:13Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">hi all,
&lt;br&gt;&amp;nbsp; i 'm new in java2d and now i want to combine four colorspace c,m,y,k tiff file into one cmyk tiff file. I used bandmerge operator to create and save the image. but the image cannot be viewed by fax viewer and it appears to be white in photoshop.
&lt;br&gt;&lt;br&gt;I also used the code in this link:
&lt;br&gt;&lt;a href=&quot;http://java.sun.com/products/javamedia/jai/forDevelopers/samples/BandMergeTest.java&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://java.sun.com/products/javamedia/jai/forDevelopers/samples/BandMergeTest.java&lt;/a&gt;&lt;br&gt;&lt;br&gt;to merge the four files but not succeed. i'm sure the four files is in the right format,c,m,y,k respectively.
&lt;br&gt;&lt;br&gt;does anybody know what's wrong with that? thanks!
&lt;br&gt;[Message sent by forum member 'mr_empty' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26177316&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mr_empty123@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=370282&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=370282&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26177316&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26177316&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/merging-4-single-band-images-into-one-4-band-cmyk-image-tp26177316p26177316.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26140907</id>
	<title>Re: Scale operator's 'translate' values</title>
	<published>2009-10-31T02:29:01Z</published>
	<updated>2009-10-31T02:29:01Z</updated>
	<author>
		<name>Rafael Santos-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; I think it's the same as with the &amp;quot;translate&amp;quot; operator. &amp;nbsp;Compare &amp;nbsp;img.getMinX() and img.getMinY() just before and after the &amp;quot;scale&amp;quot; operation. I think what you need is a combination of &amp;quot;translate&amp;quot; and &amp;quot;crop&amp;quot;.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;Helmut is right -- please check the &amp;quot;crop&amp;quot; operator example in 
&lt;br&gt;&lt;a href=&quot;https://jaistuff.dev.java.net/operators.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://jaistuff.dev.java.net/operators.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Rafael
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26140907&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26140907&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Scale-operator%27s-%27translate%27-values-tp26107982p26140907.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26133771</id>
	<title>Re: Creating big images</title>
	<published>2009-10-30T10:13:26Z</published>
	<updated>2009-10-30T10:13:26Z</updated>
	<author>
		<name>Bob Deen</name>
	</author>
	<content type="html">You have to tile the image... so each individual tile (represented by a 
&lt;br&gt;Raster) is within the size limit. &amp;nbsp;You can also structure it so that 
&lt;br&gt;only one or a few tiles need to be in memory at once, which greatly 
&lt;br&gt;helps with the memory footprint. &amp;nbsp;There are mechanisms to retrieve tiles 
&lt;br&gt;on demand for that purpose. &amp;nbsp;If you really have the memory though, you 
&lt;br&gt;can also create all the tiles at once. &amp;nbsp;In either case, the API 
&lt;br&gt;generally works as well with tiled images as it does with untiled. 
&lt;br&gt;(that's not *always* the case, but generally it does).
&lt;br&gt;&lt;br&gt;Hope that helps...
&lt;br&gt;&lt;br&gt;-Bob
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133771&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jai-interest@...&lt;/a&gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello, I want to create really big images using JAI, which I will finally write to GeoTiff or ArcGRID by using GeoTools.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In order to write the image with GeoTools, I need a Raster or an Image object. I usually use something like this to create the raster:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Raster m_Raster = RasterFactory.createBandedRaster(DataBuffer.TYPE_FLOAT,
&lt;br&gt;&amp;gt; 					60000, 60000, 1, null);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In this way, I can later use this Raster to actually write to disk by using GeoTools.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, when I use so big sizes, I get the following exception:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; java.lang.IllegalArgumentException: Size of array must be smaller than Integer.MAX_VALUE.
&lt;br&gt;&amp;gt; at javax.media.jai.RasterFactory.createBandedRaster(RasterFactory.java:307)
&lt;br&gt;&amp;gt; ....
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So I see this is not a valid option to create big images... Is there another option to create a big Raster or Image object with JAI?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks in advance,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; César
&lt;br&gt;&amp;gt; [Message sent by forum member 'dispiste' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133771&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cesar.izq@...&lt;/a&gt;)]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=369971&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=369971&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133771&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133771&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133771&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133771&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creating-big-images-tp26131860p26133771.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26131860</id>
	<title>Creating big images</title>
	<published>2009-10-30T08:18:50Z</published>
	<updated>2009-10-30T08:18:50Z</updated>
	<author>
		<name>jai-interest-2</name>
	</author>
	<content type="html">Hello, I want to create really big images using JAI, which I will finally write to GeoTiff or ArcGRID by using GeoTools.
&lt;br&gt;&lt;br&gt;In order to write the image with GeoTools, I need a Raster or an Image object. I usually use something like this to create the raster:
&lt;br&gt;&lt;br&gt;Raster m_Raster = RasterFactory.createBandedRaster(DataBuffer.TYPE_FLOAT,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 60000, 60000, 1, null);
&lt;br&gt;&lt;br&gt;In this way, I can later use this Raster to actually write to disk by using GeoTools.
&lt;br&gt;&lt;br&gt;However, when I use so big sizes, I get the following exception:
&lt;br&gt;&lt;br&gt;java.lang.IllegalArgumentException: Size of array must be smaller than Integer.MAX_VALUE.
&lt;br&gt;at javax.media.jai.RasterFactory.createBandedRaster(RasterFactory.java:307)
&lt;br&gt;....
&lt;br&gt;&lt;br&gt;So I see this is not a valid option to create big images... Is there another option to create a big Raster or Image object with JAI?
&lt;br&gt;&lt;br&gt;Thanks in advance,
&lt;br&gt;&lt;br&gt;César
&lt;br&gt;[Message sent by forum member 'dispiste' (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26131860&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cesar.izq@...&lt;/a&gt;)]
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=369971&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=369971&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26131860&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26131860&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;interest-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creating-big-images-tp26131860p26131860.html" />
</entry>

</feed>
