![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2007
Posts: 5
Rep Power: 0
![]() |
Can I Use Cgi/Perl to Pile Up Picture?
Dear Viewers,
My English is very bad so please bear with my silly mistake. Im sorry if my words are rude. ![]() I would like to know , can i use cgi/perl to combine @ pile up picture like this link below http://www.ss.iij4u.or.jp/~somali/we...composite.html they are using ImageMagick,so i would like to know whether the basic perl/cgi can do the same coding. :: what i am trying to do for my final year project is, to put a mark ( small circle dot ) on a map to show the location system after we get the latitud & latitude from the data log :: unfortunately, the mark always do not stay on the right place. i hope anybody here could help me. Thank You |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,722
Rep Power: 5
![]() |
Re: Can I Use Cgi/Perl to Pile Up Picture?
Are you using ImageMagick for Perl?
If the mark does not always stay on the right place, you might be using PerlMagick incorrectly. Could you post your code? If you do not want to use PerlMagick, you could use another image library (if one exists). Sorry. Basic Perl does not let you change images. Last edited by Sane; Jan 7th, 2008 at 8:56 AM. |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Nov 2007
Posts: 5
Rep Power: 0
![]() |
Re: Can I Use Cgi/Perl to Pile Up Picture?
this is the code
open FILE, ">>$file"; #ファイルへの書き込み #flock (FILE, 2); print (FILE "\"", $tizu); print (FILE "\"\,\"", $ido); print (FILE "\"\,\"", $keido); print (FILE "\"\,\"", $jikan); print (FILE "\"\,\"", $tate); print (FILE "\"\,\"", $yoko); print (FILE "\"\,\"", $wariai); print (FILE "\"\n"); #flock (FILE, 8); close FILE; $view = "${tizu}.jpg"; print "Content-type: image/jpeg\n\n"; #HTMLファイルや画像ファイルは、サーバからデータを送信する際に情*の種類を示す(ブラウザに返すレスポンスの形式を指定) open(IMG, "$view"); binmode (IMG); binmode STDOUT; print <IMG>; $a = '1.gif'; print "Content-type: image/gif\n\n"; open(IMG, "$a"); binmode (IMG); binmode STDOUT; print <IMG>; # close(IMG); exit; thank you for your help ![]() |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,722
Rep Power: 5
![]() |
Re: Can I Use Cgi/Perl to Pile Up Picture?
Oh. You are not using PerlMagick. Will you try it?
Have you considered overlaying the two images in HTML using CSS? For example, to place the image "some_img.jpg" at coordinates (100, 150) on the website: HTML Syntax (Toggle Plain Text)
CSS Syntax (Toggle Plain Text)
This may be simpler depending on your requirements. |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Nov 2007
Posts: 5
Rep Power: 0
![]() |
Re: Can I Use Cgi/Perl to Pile Up Picture?
thanks sane.
i will try to do the overlaying things using CSS. Can i ask you something, what is the meaning of binmode ( binary mode ) and how to use it? im doing this with 2 of my friends and they asked me to find that " can we overlay images using binary mode?" ?? thank you again. sorry |
|
|
|
|
|
#6 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,722
Rep Power: 5
![]() |
Re: Can I Use Cgi/Perl to Pile Up Picture?
binmode only changes the file handler from TEXT mode to BINARY mode. So that when you read/write a file, the file stream knows that it is Binary, and not Text. Binary mode is necessary if you are reading/writing a file that is not text, such as an image. An image is binary, so you must use binmode to read it. Binmode can not be used to do or "make" anything. In other words, you can not use binmode to overlay images. If you wrote your own image decoding algorithm to put the pixels together manually, you would need binmode to do that. This is what ImageMagick is meant to do for you. You do not want to rewrite something that complicated, especially if it has already been done for you. Do not forget about the alternative of using PerlMagick, it may be more stable than relying on the browser to work correctly with CSS. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need picture help | RAzR Creations | Visual Basic | 3 | May 21st, 2006 3:43 AM |
| cgi/perl script + IE problem | joyceshee | Perl | 2 | Jan 24th, 2006 11:10 AM |
| picture viewer | JDStud6 | HTML / XHTML / CSS | 6 | Nov 16th, 2005 9:33 PM |
| Upload Picture | yip_kw_trowa | PHP | 3 | Oct 14th, 2005 8:36 AM |
| Where does print screen keep the picture? | Sane | Coder's Corner Lounge | 11 | Sep 3rd, 2005 1:40 PM |