CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Insert image into perl script

 



mmcw2201
User

Oct 22, 2002, 4:04 AM

Post #1 of 3 (896 views)
Insert image into perl script Can't Post

Is it possible to insert a image code into a perl script?

This is what I want to do:

I have a script where I need a few images. I need to tell the script where the images are and have to upload aech images to a directory. This is no problem but I want to automate this. Because a lot of servers will not allow images in the cgi-bin directory the images ghave to be uploaded somewhere into the www directory. That somewhere is not always the same so automation is difficult.

Therefor is it possible to add forexample the binary gif code of a gif image or the binary jpg code of a jpg image to a perl script. I would call it a pl script and it can be uploaded into the same directory I entered the perl scripts. I do not need to upload the images into the www directory anymore!

Is this possible?


davorg
Thaumaturge / Moderator

Oct 28, 2002, 2:17 AM

Post #2 of 3 (881 views)
Re: [mmcw2201] Insert image into perl script [In reply to] Can't Post

You could probably put the data for an image in your script's DATA section. With Inline::Files you could put more than one image in there.

But, all in all, it's probably easier to just make the path to the images a configuration option. It makes it easier to change them.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


mmcw2201
User

Nov 1, 2002, 9:29 AM

Post #3 of 3 (872 views)
Re: [davorg] Insert image into perl script [In reply to] Can't Post

I have now the folling working script:


Code
   

use strict;
use MIME::Base64 ();
use IO::File;

my $in_file = $ARGV[0];
# Enable slurp mode!
local $/;
undef $/;
my $in_handle = new IO::File;
my $out_handle = new IO::File;
$out_handle->open( $ARGV[0], 'w' ) or die "Failed to open $ARGV[0] because $!";
$out_handle->print(<DATA>);
for (my $i=1; $i<=$#ARGV; ++$i)
{
$out_handle->print("\n__DATA__\n");
$out_handle->print("begin Base64 $ARGV[$i]\n");
$in_handle->open( $ARGV[$i], 'r' ) or die "Failed to open $ARGV[$i] because $!";
$out_handle->print(MIME::Base64::encode(<$in_handle>));
$in_handle->close();
$out_handle->print("end");
}
$out_handle->close();

exit;

__END__
#!/usr/bin/perl -w

use strict;
use MIME::Base64 ();
use CGI;

my $q = new CGI;
my $image_name = $q->param('image') || 1;
my @data;
do {
# use this as the data separator
local $/ = "__DATA__";
@data = <DATA>;
};

foreach my $j ($[ . $#data){
my $encoded = $data[$j];
if ($encoded =~ /begin Base64 $image_name/) {
# Add header
if ((split(/\./,$image_name))[-1] eq "gif") {
print $q->header(-type=>'image/gif');
}
elsif ((split(/\./,$image_name))[-1] eq "jpg") {
print $q->header(-type=>'image/jpeg');
}
# Remove the begin lines
$encoded =~ s/\A\s*begin Base64.*?$//m;
# Remove the end lines and any trailing __DATA_ separator
$encoded =~ s/^end\s*(__DATA__\s*$)*//m;
binmode STDOUT;
print STDOUT MIME::Base64::decode($encoded);

exit;
}
}
print $q->header(-type=>'text/html');
print "not found";

exit;

running this script saved as doit.pl using ActivePerl on my home computer:

perl -w doit.pl img_base.pl edit.gif balk_top.gif balk_right.gif balk_left.gif balk_bottom.gif balk.gif add.gif secure.gif remove2.gif remove1.gif remove.gif rem.gif print_on.gif print.gif helpicon.gif new.gif fakecron_done.gif fakecron.gif view.gif stamp.gif down_white.gif down_black.gif up_black.gif up_white.gif select.gif

will result in this:


Code
   

#!/usr/bin/perl -w

use strict;
use MIME::Base64 ();
use CGI;

my $q = new CGI;
my $image_name = $q->param('image') || 1;
my @data;
do {
# use this as the data separator
local $/ = "__DATA__";
@data = <DATA>;
};

foreach my $j ($[ . $#data){
my $encoded = $data[$j];
if ($encoded =~ /begin Base64 $image_name/) {
# Add header
if ((split(/\./,$image_name))[-1] eq "gif") {
print $q->header(-type=>'image/gif');
}
elsif ((split(/\./,$image_name))[-1] eq "jpg") {
print $q->header(-type=>'image/jpeg');
}
# Remove the begin lines
$encoded =~ s/\A\s*begin Base64.*?$//m;
# Remove the end lines and any trailing __DATA_ separator
$encoded =~ s/^end\s*(__DATA__\s*$)*//m;
binmode STDOUT;
print STDOUT MIME::Base64::decode($encoded);

exit;
}
}
print $q->header(-type=>'text/html');
print "not found";

exit;

__DATA__
begin Base64 edit.gif
R0lGODlhGQATALMAAAAAABQQCDEjDTQvJ2FGHadsD29jUauRe96MCO+UCPOcDNueWM69vc7GvdbO
xv///yH5BAEAAA4ALAAAAAAZABMAAAR60MlJqyXYSsC778SyHIQGPGiqPkQhkua6EkpRGEZpnR8X
EAkF4qbbyVDAhK1QNPaANVvTOEMIpQ==
end
__DATA__
begin Base64 balk_top.gif
R0lGODlhogEMALMAAP///+/v79/f37+/v7W1taysrJmZmY+Pj2ZmZkRERDs7OzMzMxUVFQ8PDwAA
AAAAACwAAAAAogEMAAAErXDISau9OOvNu/9gKI5kaZ5oqq6nALxwLANObd94ru987//AoHBILA==
end
__DATA__
begin Base64 balk_right.gif
R0lGODlhDgBIAfcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4O
Dg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGQ==
end
__DATA__
begin Base64 balk_left.gif
R0lGODlhDwBUAfcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4O
Dg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGQ==
end
__DATA__
begin Base64 balk_bottom.gif
R0lGODlhlAEIALMAAP///+/v76+vr5mZmXJycmZmZktLSz8/Pw==
end
__DATA__
begin Base64 balk.gif
R0lGODlhFABAAfcAAP///+/v7+fn59/f39fX18zMzL+/v7e3t5mZmY+Pj/9mAIeHh39/f8xmM99X
HWZmZlxcXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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zY8mjMgTV35lza82nQAESvJp3Z9GzUkVW3Zl3b9W3YsnfTTm1bOO7Q
unvzJu7bOPDkzJfnLq58+PTm1Y/Hhn5dOnLq0a3+f8ceXnvw7M/Bdxe/Xf147+3JrzfP/T378+XT
y7dP3318+PjNpx+A9f13X4EB8jfggf4laGB/+z24IIQENojghRZmGKGDHGK4oYcVfqhhiCQyKOKJ
JVJoYooTtviWi3+9KGOMND42o401fnajjjm+tqOPPf72o5BBOjekkUWid6SSSea3pJNNCviklFEq
OKWVVUp4pZZZdjjiimCqKCaMOJbJo5lAokmkmkiyyaSbUMJJpZxY0smlnV6iGCaZZ/aZpp9rAtqm
oG8S
end
__DATA__
begin Base64 add.gif
R0lGODlhEQATALMAAAAAAHt7e9bOxv//AP//////////////////////////////////////////
/////yH5BAEAAAIALAAAAAARABMAAARVcAgRJAUYzF0poQNBAOM2VWgokuU2VEQgB6PYzsSgrnYr
xKIAZpTJBE67Xk9zIhYzqw1LqWQKSM9idDKl2qzY7NDX9ZKd2e3VvJSin+qyF8z+SsXZCAA7
end
__DATA__
begin Base64 secure.gif
R0lGODlhHQAgAPcAAP/+nwMDAh0dHJCQjbq6t8DAwP/+zf7yd9PSy/jfTfrJBU9NRW5sZMycBhcS
BAcFADorBptuBwsIAS4tKyMYBHtNAA8KAl43AAUDARMSEQcHBwAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAA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qHh/VHR9/Ly/JiYv0jI+apqf7q6vRVVfg1Nf7Jyf2lpf5ra/0ZGf6K
iv1HR+K3t/6+vv7+/u13d+mVlf15ef7W1t7W1v5eXv2YmP08PO5ubvorK/RcXP6trf///yH5BAEA
AB8ALAAAAAAYABcAAAXH4CeOZGme5BAgCZd01IWWQwfcTXEDDTWLhgbg4TlIjpbKDSE7GXieo1R6
0AAEp4EwM+1KDg/AxBS+cb1UYVMEAWAsOgZamhGTCADLN6wxog8ACSQcBVMMPApzViRDXQs3C2gI
AE0Xbl4KcV6Ta41eVUN+R4sjhHMShwV6R4Ekk6todQBRjxskT3KnEToVHAADJQkAEadfvgC2JW0A
iadKCWu3ZmgWYRzAKBA6DQwLER4OZUw/HxcbQjs3AgbkyhQTAQbY7fQmIQA7
end
__DATA__
begin Base64 remove1.gif
R0lGODlhDwATAJEAAAAAAP//+////////yH5BAEAAAMALAAAAAAPABMAAAI3nA2Zd+oPBhC02pps
uBj6NXFWJFHhaSLmhgpkC6uuSbsynJbzft51r8PZgr+cEHg0ikaIj2NQAAA7
end
__DATA__
begin Base64 remove.gif
R0lGODlhDgAOALMAAAAAACkpKTk5Of//////////////////////////////////////////////
/////ywAAAAADgAOAAAEJRDISesYdV6NbefUBgRhJwKCd2bSygJudsUg/JU42t77aL+0VwQAOw==
end
__DATA__
begin Base64 rem.gif
R0lGODlhDwATALMAAAAAANbOxv//////////////////////////////////////////////////
/////yH5BAEAAAEALAAAAAAPABMAAAQ6MEgJap3T6g0CEGAohtVoglxqeafYscIXoyhFz/gr77fe
97YcEMbLBYu74y+mFDKJS58zCWs9VZtABAA7
end
__DATA__
begin Base64 print_on.gif
R0lGODlhFgAUAPcAAAAAAAApzgB7AAD/ACkp/ylj/1paWoSEhK2trc7OztbOxt7e3ufn5/f39///
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////yH5BAEAAAoALAAAAAAWABQA
AAiwABUIHEiwoMGDAg8oXMjwAMKECRhInCgxAYCHByIW2MixQIOLGCU2YDCypEWMEQmoXEng40MF
B0g2mEmzgUUAOA1mZBCgp88ADAAoFApyYEySSEt+PEC0aMOnC4kyTThxgdWrCbJaZDo0IVSoQrvC
FHl1gdasCBCEdUqybFYBcAWkbWqUgdusA/IOmAvAQFGcgAMLxmnAL8GYWNGmnVu4KNXECRYzdjxw
sGXKLzMrCAgAOw==
end
__DATA__
begin Base64 print.gif
R0lGODlhFgAUAPcAAAAAAFpaWmNjY4SEhK2trc7OztbOxt7e3ufn5/f39///////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////yH5BAEAAAYALAAAAAAWABQA
AAinAA0IHEiwoMGDAgcoXMhwAMKEBRBInCixAICHAyI2VIjgIkaJCRCEHGkRY0QBKAOk7PjQwACQ
ImMmsAigpsGMCFDqVNlRIYABHge+lCkzwc+jQTcqBcrU41AEB6JKLUDVIlOgCZdu/OkzIUipB6pS
JUCAa1KRYKkyJItUKNSpVMGyBRAgaM27ePPWVBnU5duwY8my5VvwJdwCgtkK6DtQr2PGLSMbCAgA
Ow==
end
__DATA__
begin Base64 helpicon.gif
R0lGODlhFAAUALMAAC4qE1tQMHVsH3dzYqCeDJGQX5ycnLGxsf//AMbGCNzWCNfPNMHBwdbW1ufn
5+/v7yH5BAEAAA8ALAAAAAAUABQAAAR68MlJq7Um64uH94XBTcYQnCcRjgaRIDBMCCvmKkqiwIow
iJWSTjEj7HoBIMUQQBADAMELqSQFEgIAYOBCEADJTsEUcCUS4Ooy49FhAerOwPmNYwovAtQeHAhm
WnxLJgJQcCMkA2Anh4gPBgUuhQCOiWM/lSQbmZwPEQAAOw==
end
__DATA__
begin Base64 new.gif
R0lGODlhHAALAKEAAAAAAP/WAP///wAAACH5BAEAAAIALAAAAAAcAAsAAAJAlI+paxHnHorQqQAk
jjzDTDWAt43m1jmeiGZgBMaqJLTl+Nj2l+Mv6+rRNkCOykWyNJQ1jOllrK0YRmYixMhqCwA7
end
__DATA__
begin Base64 fakecron_done.gif
R0lGODlhJwAeAPcAAAAAABAQECEhISkpKTExMVJSUnNzc4yMjJSUlKWlpa2trbW1tcbGxtbW1ufn
5/8AAP//////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////yH5BAEAABAALAAAAAAnAB4A
AAj+ACEIHEiwoMGDCBMiZLCAQYMEBAo0UEjxIIMCADJqzCigokcIDghsHJmRwUeFDQKQJJngJMKU
K0kecGkQ5kgBBAaMnElzoAOVGwO0FIhRI8+eEHRuHOCA4M+MAZoiPTCSqYMCKheAPHBA6oKoJxvc
bEoV50SDVLV+FLnxrACwCKma9MhgJ4QGZblKTXBgaFoICgJodcA3gVSBbDkiHtmggVIAAyDIVQAg
QAMHj+E6GDm3Qd0BDpMCKLAAsuTRlSdiLBAYwFmq
end
__DATA__
begin Base64 fakecron.gif
R0lGODlhJwAeALMAAAAAABAQECEhISkpKTExMVVVVXNzc4iIiJSUlKWlpa2trbW1tcbGxtbW1ufn
5////yH5BAEAAA8ALAAAAAAnAB4AAAT+8MlJq704Y7ZYS0TRaOTFFECqpkLpPg6xzinzak1A08mN
5TvawWcBzgSEwWxInDh0q0BPglIxmw/lauCgPFOBLvYw4zoKugXscBAvwrfGsUtGjixk9Uu2ugvg
GGQ2LgxLDw11bGIJB1N5DwoBag6MCWISfCyYMw0NWgADD4IKAAENDp+ADjODDYUDHlkABQugorOl
IygFkQB3ZCotFAAEEnIFEsS3KcgPAQEGOldVKVfJxQ+1TMpkA0oIDyxtFJ8AgxPKMAACCwnrDzIe
Ar7zCe0B2ysW6Q/UKQ0y1BQSASVXMn0UjlFY0MhBG0QTDoyg1BDdikvGLjkc16TclAs/b1JwaWIg
CkYJDkqusPZCzgoB5ygVtILFH4skQQAR+RKExkgsh2b2NAA0YTk=
end
__DATA__
begin Base64 view.gif
R0lGODlhFAATALMAAAAAAMacCOetAO/OY+/epfe9GP/vvf//////////////////////////////
/////yH5BAEAAAcALAAAAAAUABMAAARu8MhJq70g6w2uBENYBIEgFF3FrYCQUqBommP7spwQ2BNg
/IZBYVhwAXau3o9AIJFMLeTNgDNKlUyCsATVAVDKaub6WYaEQ1cNXBYfeWUDU5T+7tgHAMG9y2BD
WmhqOyp7LEZ+MEBmQkkYOA==
end
__DATA__
begin Base64 stamp.gif
R0lGODlhogBKALMAAAAAAPdjAP9jAP//////////////////////////////////////////////
/////yH5BAEAAAIALAAAAACiAEoAAAT+cMhJq704680x+GAojmQpdmiqrmzrAUIsz3Rt3/Ln7nzv
v7igUKj7GY9IDWzIbOaS0Ohx6awGAdKslkW1emnYrXjs+ZpnYbKa3D170+t4tu2uwuV4JL3evOf/
PXt8Q36AhlyDb4eLLoKJOIWMkhmOjzaRk5kUlZZgmp9lnUyYoJOcojGkpYynqKqrh62ir7CAsp20
tXm3lrm6cryPvr9rwYnDxGyohMmZxoPIzVvPfNHSc8tE16zZV9uL1HXW30nhbuPkU92Q6bbrN+jt
PuZn8fI89Gb2943vl/zA/NXYB3BFvi8EC6Y4qEihMoFoHD6EmEriGIZWElpUQvHJRi1hGO18BNmx
4kgpIZ1oPFkhZR+WUVyOgglFJjOaekoKWInTpjac6joG4EnzQ8ciQI0YFYg0qVKfaIg6NUG1qgmn
WLNq3cq1q9evYMOKHUu2rNmzaNOqXcu2rdu3cOPKnbsmAgA7
end
__DATA__
begin Base64 down_white.gif
R0lGODlhDAAGALMAAABjnP//////////////////////////////////////////////////////
/////yH5BAEAAAAALAAAAAAMAAYAAAQQMMhJJagVaGz1zp5HhWTnRQA7
end
__DATA__
begin Base64 down_black.gif
R0lGODlhDAAGALMAAABjnAAAAP//////////////////////////////////////////////////
/////yH5BAEAAAAALAAAAAAMAAYAAAQQMMhJJagVaGz1zp5HhWTnRQA7
end
__DATA__
begin Base64 up_black.gif
R0lGODlhDAAGALMAAABjnAAAAP//////////////////////////////////////////////////
/////yH5BAEAAAAALAAAAAAMAAYAAAQREEgZwry0Wgy0xp43hWFHhhEAOw==
end
__DATA__
begin Base64 up_white.gif
R0lGODlhDAAGALMAAABjnP//////////////////////////////////////////////////////
/////yH5BAEAAAAALAAAAAAMAAYAAAQREEgZwry0Wgy0xp43hWFHhhEAOw==
end
__DATA__
begin Base64 select.gif
R0lGODlhGQATAPcAAAAAAACcAAD/AKWlpdbOxv//////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////yH5BAEAAAQALAAAAAAZABMA
AAhaAAkIHEiwoMGDCBMqXMiwIYEADhMGEADRYcWBEwVQbDjxYkaNAgAs/Ajxo0YAAxQCAKnRZMiU
C1eyZInSocyZNSPePAkzIoGbOX0KXBlU6NCeRpMqXcoUYUAAADs=
end

The script can be called with the following url: img_base.pl?image=add.gif

But some of the image or not complete or a little bit corrupted??

forexample see:
http://m-scripts.hypermart.net/cgi-bin/MakeImageScript/fakecron.gif

and

http://m-scripts.hypermart.net/cgi-bin/MakeImageScript/img_base.pl?image=fakecron.gif

the image looks corrupted??

The same is for:
http://m-scripts.hypermart.net/cgi-bin/MakeImageScript/fakecron_done.gif
and
http://m-scripts.hypermart.net/cgi-bin/MakeImageScript/img_base.pl?image=fakecron_done.gif

http://m-scripts.hypermart.net/cgi-bin/MakeImageScript/view.gif
and
http://m-scripts.hypermart.net/cgi-bin/MakeImageScript/img_base.pl?image=view.gif

I have zipped the perl scripts I use and the images to img_base.zip. Can be downloaded from http://m-scripts.hypermart.net/cgi-bin/MakeImageScript/img_base.zip

What am I doing wrong??

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives