Μανο εγω το κάνω λίγο διαφορετικά, με εναν απλο μα συνάμα διαφορετικό τρόπο, να δες..<br><br>:P<br><br>Φτιαχνω ενα αρχειο imageConcat.java και βάζω<br><br><br><br>package gr.zenika.play.images;<br><br>import java.awt.image.BufferedImage;<br>
import java.io.File;<br>import java.io.IOException;<br><br>import javax.imageio.ImageIO;<br><br>public class imageConcat(){<br><br> public static void main(String[] args) throws IOException, Exception {<br> File file1 = new File("/home/user/BlackDragonWallpaper.jpg");<br>
File file2 = new File("/home/user/black_attack_001_1024x768.jpg");<br> File file3 = new File("/home/user/windows-vista-wallpaper-120.jpg");<br> File file4 = new File("/home/user/wallpapers_windows_vista-xp-longnhor_-_redcode_0051.jpg");<br>
<br> BufferedImage img1 = ImageIO.read(file1);<br> BufferedImage img2 = ImageIO.read(file2);<br> BufferedImage img3 = ImageIO.read(file3);<br> BufferedImage img4 = ImageIO.read(file4);<br>
<br> int widthImg1 = img1.getWidth();<br> int heightImg1 = img1.getHeight();<br><br> int widthImg2 = img2.getWidth();<br> int heightImg2 = img2.getHeight();<br><br> BufferedImage img = new BufferedImage (<br>
widthImg1 + widthImg2, // Final image will have width and height as<br> heightImg1 + heightImg2, // addition of widths and heights of the images we already have<br> BufferedImage.TYPE_INT_RGB);<br>
<br> boolean image1Drawn = img.createGraphics().drawImage(img1, 0, 0, null); // 0, 0 are the x and y positions<br> <br> if(!image1Drawn) System.out.println("Problems drawing first image"); //where we are placing image1 in final image<br>
<br> boolean image2Drawn = img.createGraphics().drawImage(img2, widthImg1, 0, null); // here width is mentioned as width of<br> <br> if(!image2Drawn) System.out.println("Problems drawing second image"); // image1 so both images will come in same level<br>
<br> boolean image3Drawn = img.createGraphics().drawImage(img3, 0, heightImg1, null);<br> <br> if(!image3Drawn) System.out.println("Problems drawing third image");<br> <br>
boolean image4Drawn = img.createGraphics().drawImage(img4, widthImg1, heightImg1, null);<br> <br> if(!image4Drawn) System.out.println("Problems drawing fourth image");<br> <br>
// horizontally<br> File final_image = new File("/home/user/Final.jpg");<br> <br> boolean final_Image_drawing = ImageIO.write(img, "jpeg", final_image);<br> <br>
if(!final_Image_drawing) System.out.println("Problems drawing final image");<br> <br> System.out.println("Successfull");<br> }<br><br><br><br>}<br><br>Και μετα δίνω<br>
<br>javac imageConcat.java<br>java imageConcat<br><br>αυτα!<br><br>:p :p<br><br>Καλημερα και καλη εβδομαδα με χιουμορ σε ολους!!!!<br><br>Υ.Γ. το παραπάνω δουλευει!<br><br><span style="color: black;"><div dir="ltr"><div>
<font size="2"><b><font face="verdana,sans-serif">Alexius Dionysius
Diakogiannis</font></b></font><br>
Software Architect/Consultant<br><br>
<font size="1">t: 801 700 7374 / +30 211 790 3292        <br>
f: +30 211 790 3880<br>
m: +30
6944 915 876<br>
e: <a href="mailto:alexius.diakogiannis@zenika.gr" target="_blank">alexius.diakogiannis@zenika.gr</a><br>
w: <a href="http://www.zenika.gr/" target="_blank" rel="nofollow">http://www.zenika.gr</a></font><br>
</div><br></div></span><br><div class="gmail_quote">2010/5/17 Emmanouil Batsis (Manos) <span dir="ltr"><<a href="mailto:manos@abiss.gr">manos@abiss.gr</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On 05/16/2010 09:01 PM, Jimmy Angelakos wrote:<br>
> O πιο απλός τρόπος είναι να τρέξεις από τερματικό:<br>
><br>
> convert eikona1.jpeg eikona2.jpeg +append apotelesma.jpeg<br>
><br>
><br>
> Αυτό προϋποθέτει ότι έχεις εγκατεστημένο το Imagemagick (νομίζω είναι<br>
> προεγκατεστημένο).<br>
<br>
Πόσες ώρες μου έχει σώσει αυτό το Imagemagick...<br>
<br>
<br>
--<br>
Manos Batsis, Chief Technologist<br>
__ _<br>
____ _/ /_ (_)_________ ____ ______<br>
/ __ `/ __ \/ / ___/ ___// __ `/ ___/<br>
/ /_/ / /_/ / (__ |__ )/ /_/ / /<br>
\__,_/_.___/_/____/____(_)__, /_/<br>
/____/<br>
<a href="http://www.Abiss.gr" target="_blank">http://www.Abiss.gr</a><br>
19, Kalvou Street,<br>
14231, Nea Ionia,<br>
Athens, Greece<br>
<br>
Tel: +30 211-1027-900<br>
Fax: +30 211-1027-999<br>
<br>
<a href="http://gr.linkedin.com/in/manosbatsis" target="_blank">http://gr.linkedin.com/in/manosbatsis</a><br>
<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: manos.vcf<br>
Type: text/x-vcard<br>
Size: 393 bytes<br>
Desc: not available<br>
Url : <a href="https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20100517/9889eb73/attachment.vcf" target="_blank">https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20100517/9889eb73/attachment.vcf</a><br>
<font color="#888888">--<br>
Ubuntu-gr mailing list<br>
<a href="mailto:Ubuntu-gr@lists.ubuntu.com">Ubuntu-gr@lists.ubuntu.com</a><br>
<br>
If you do not want to receive any more messages from the ubuntu-gr mailing list, please follow this link and choose unsubscribe:<br>
<a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr</a><br>
</font></blockquote></div><br>