then answer this one
i posted it yesterday and i am yet to get a reply
___________________________________

hi gurus!
i have problem...i have 3 images,image1,image2,image3.... what i want is to
read all this
image...
arrange one over the other and make a single file out of it how can do
it...i code i have
written fine with text files but with images it reads all images that is
file size is sum of three
but displays only first image....
also can pls some body tell..how can
i convert ..say i have ten string i have make a image out of the content of
the strings
my code is
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.Toolkit.*;
class InputEnum implements
meration{
private Enumeration files;

public InputEnum (Vector files)
{
this.files=files.elements();
}
public boolean hasMoreElements()
{
return files.hasMoreElements();
}
public Object nextElement()
{try{
return new FileInputStream(files.nextElement().toString());
}
catch (Exception e){
return null;
}
}}

class readgif{
public static void main(String args[]) throws Exception{
byte c[];
int clength;
byte[] buffer;
int width=100;
int height=100;
int buff=256;
int[] pixels=new int[width*height];
Vector files =new Vector();
files.addElement("c:/new.gif");
files.addElement("c:/efax1.gif");

ImageProducer source=new MemoryImageSource (width,height,pixels,0,width);
Toolkit tool=Toolkit.getDefaultToolkit();
Image img1=tool.createImage(source);

Image img2;
System.out.println("start");
InputEnum enumFile = new InputEnum(files);
SequenceInputStream gifFiles= new SequenceInputStream(enumFile);
Image img3=Image(gifFiles);
FileOutputStream gifNew1= new FileOutputStream("test.gif");
clength=gifFiles.available();
System.out.println(clength);
byte[] b=new byte[clength];
int bytesread=0;
int offset=0;
System.out.println("b1");
while((bytesread=gifFiles.read(b))!=-1)
{

}
gifNew1.write(b);
/*while((a=gifFiles.read())!=-1){
gifNew1.write((byte)a);
}*/
gifFiles.close();

new GifEncoder(img1,gifNew1,tru
e).encode();

gifNew1.close();
System.out.println("finished");
}}

thanx in advance,
kishor



----- Original Message -----
From: "Srinivas, Santoshkumar (CORP, GEITC)"
<[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 10:07 AM


> Could we discuss more important things on the list?? :)
>
>
>
> -----Original Message-----
> From: Kishor K [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 10:49 PM
> To: [EMAIL PROTECTED]
> Subject:
>
>
> r u brother of ashu varshney
>
>
> ----- Original Message -----
> From: "Varshney, Arun" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 08, 2001 2:30 AM
>
>
> > sign-off
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to