#0, Need Image Magick Help!
Posted by Jayzfury on Jun-18-02 at 05:49 PM
Hello,
I know this subject was brought up for a short while on this forum but no one has answered my recent entry in a few days. So I'll try again here...I am using Image Magick very successfully at SpecialEngines.com's SE Auctions when images are up-loaded in the sub new2, but I do have a problem with Thumbs not showing up for images loaded with the Bulk Loader and the Self-hosted images entered into the sub new.
Seems that only up-loaded Images will produce thumbs. That is a fact of life in the fast lane. Hopefully I don't confuse anyone here!
-----------------------
Anyways, I am testing this code to call up thumbnails at this time.. This one almost works.. Need a little help on this one!
I use (my $thumbpic) to call $image1$t or no $image1$t but does not call up the $imagedisp1 if no $image1$t.
-----------------------
my $t = "t";
my $thumbpic;
if ($image1 ne '') {
$thumbpic = "<a href=\"#DESC\"><IMG SRC=$image1$t border=1 width=\"50\"></a>";
}
if ($image1 eq '') {
$thumbpic = "<IMG border=0 SRC=$config{'no_pic'} alt=\"No pictures for this item!\">";
}
if (($imagedisp1 ne '') && ($image1 eq '')) {
$thumbpic = "<a href=\"#DESC\"><IMG SRC=$image1 border=1 width=\"50\"></a>";
}
print "$thumbpic";
-------------------------------
I have in the mean time, for those that use Image Magick, developed a simple command code to display Thumbs (if any) on the Item Display pages, if image1, if no image1 it displays a No Pic Picture instead.
This is placed above the DISC & BID buttons. See a working example at SE Auctions: http://specialengines.com/auction
Thanks...
This is Setup to display a No Pic Image also if no thumbnail pic, but can be changed to use the NO PICS Words instead (you will need a no_pic.gif image or use words). Simply move the #-#####'s and block out the print command not needed.
--------------------------------
my $t = "t";
my $thumbpic = "<a href=\"#DESC\"><IMG SRC=$image1$t border=1 width=\"50\"></a>";
if ($image1 eq '') {
#-##### print "<table align=center border=1 cellpadding=0 cellspacing=0 width=58 bgcolor=$config{'colortablebody'}><tr><td align=center><font size=1 color=red><B>NO PICS</B></font></td></tr></table> <br>";
print "<IMG border=0 SRC=$config{'no_pic'} alt=\"No pictures for this item!\"> <br>";
} else {
print "$thumbpic";
}
--------------------------------
eMail me if you like and lets swap ideas!
Thank you for any suggestions,
Jayzfury jay@specialengines.com
#1, RE: Need Image Magick Help!
Posted by Jayzfury on Jun-25-02 at 04:18 PM
In response to message #0
Image Magick Users,
Don't know if anyone is still interested in this subject, but I finally came up with an easy fix! For any of you that are using Image Magick for thumbnails, I came up with a quick solution for the blank image box on the Display Page when a client has a hosted image somewhere else on the internet.
See this working at: http://specialengines.com/auctionThumbs work even better on all the dispall... pages because it uses (yes or no) for $image1. Using the Code from the last forum comments above. See this at: http://specialengines.com/auction
---------------
The following code was used for the Display Item Page:
Place it above the Description and Bid Button or where ever you want. You will need to make a No-Pic image or you can change it to use the words "NO PIC".
The "no_thumb.gif" is my background image that says "No Image Thumb" on it and the "$config{'no_pic1'}" is used to call up my no-pic image, leaving $thumbpic to represent the thumbnail "$image1$t".
---------------
EOF
print "<table width=50 border=1 background=../../auction-images/no_thumb.gif align=center cellspacing=0 cellpadding=0>
<tr><td align=center>";
my $t = "t"; # add $t like this $image1$t
my $thumbpic = "<a href=\"#DESC\"><IMG align=center SRC=$image1$t border=0 width=\"50\"></a>";
if ($image1 eq '') {
print "<IMG align=center border=0 SRC=$config{'no_pic1'} alt=\"No pictures for this item!\">";
} else {
print "$thumbpic";
}
print "</td></tr></table>";
print <<"EOF";
---------------
Just an idea, but maybe this little bit of info can help the Thumbnail Image Magick users out there.
Jayzfury
jay@specialengines.com
at
http://specialengines.com
#2, RE: Need Image Magick Help!
Posted by Thumbnails on Jun-25-02 at 10:54 PM
In response to message #1
Thanks for posting the information! Many are complaining about their site loading slowly or script running slowly when the cause is the large PayPal logo and compressed images on the front page. The most important addition needed to this script is imagemagick!Thanks Again
#3, RE: Need Image Magick Help!
Posted by djblamire on Jul-03-02 at 05:46 PM
In response to message #2
Is Image Magick fairly simple to install on a server?? - Any recommendations on integrating it with Makebid Auctions would be appreciated.Thanks
Daniel.
#4, RE: Need Image Magick Help!
Posted by Jayzfury on Jul-04-02 at 04:09 AM
In response to message #3
Hello all,
This may help.. Hopefully you have ImageMagick on the server that you are hosted on. It won't work if not...Follow the instructions from the text below... Good luck!
##############################################
Imagemagick software must be installed on your server or this won't work.
BACKUP ALL AUCTION FILES BEFORE YOU START!!
1. Open Auction.pl:
Add this line below to the other use commands at top:
use Image::Magick;
2. Goto sub procnew and find this line:
if ($form{'UPIMAGE1'} ne "") {
&File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE1'}", "$config{'imagebase'}/$form{'UPIMAGE1'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");
3. Add these lines below it:
if ($form{'GALLERY'} eq "Yes" ) {
my ($q, $x);
$q= Image::Magick->new;
$x= $q->Read("$config{'imagebase'}/$form{'UPIMAGE1'}");
warn "$x" if "$x";
$x = $q->Resize(geometry=>'80x80');
warn "$x" if "$x";
$x=$q->Write("$config{'imagebase'}/$form{'UPIMAGE1'}t");
}
4. In the gallery area of auction.pl find the line:
my $timeremain = time_remain($file);
Below it add this line:
my $t = "t";
6. Edit the next line from:
my $imagedisp = "<IMG SRC=$image1 BORDER=\"0\" WIDTH=\"75\">";
To:
my $imagedisp = "<IMG SRC=$image1$t BORDER=\"0\" WIDTH=\"75\">";
7. Save the auction.pl file.
8. Now Open gallery sections in the dispallgallery.pl & dispcat7.pl, if you use dispcat7.
(the gallery disp files)
9. In the gallery area of these files find the line:
my $timeremain = time_remain($file);
Below it add this line:
my $t = "t";
10. Edit the next line from:
my $imagedisp = "<IMG SRC=$image1 BORDER=\"0\" WIDTH=\"75\">";
To:
my $imagedisp = "<IMG SRC=$image1$t BORDER=\"0\" WIDTH=\"75\">";
11. Save the gallery files.
Finally you upload both files and hopefully everything works.
Extra Note: It will not convert your current featured gallery to thumbs but will make thumbs for auctions posted after the editing.
##############################################
This will not make thumbnails for images if they are hosted somewhere else, only the uploaded images will make thumbs.
See http://specialengines.com/auction for a working example. We could definetly use the traffic!
Check with www.powweb.com, they have ImageMagick on their server. Rates are $7.77 per mo. for 200 meg and your own control panel. If you host there, let them know Jayzfury at SpecialEngines.com recommended you. I get a free month if you sign up. Thanks..
Jayzfury
jay@specialengines.com
at
http://specialengines.com
#5, RE: Need Image Magick Help!
Posted by Jayzfury on Jul-17-02 at 03:50 PM
In response to message #4
Hello all,
Here is some additional info on Image Magick... This may come in handy! This will remove the Thumbnail files fron your auct-photos directory when an item is deleted or removed by the seller.#####################################
# Unlinking your Thumbnail files.
1. Open selleredit.pl file and locate these lines...
if ($image1 ne "") {
my @image1 = split /\//, $image1;
$image1 = pop @image1;
$image1 =~ s/\"|\'|\>//g;
unlink "$config{'imagebase'}/$image1";
}
3. Place this bit of code below it so the thumbnail file (.jpgt, .gift, etc.) will be deleted when someone deletes their auction early or completely removes it from your system.
if ($image1 ne "") {
my $t = 't';
my @image1 = split /\//, $image1;
$image1 = pop @image1;
$image1 =~ s/\"|\'|\>//g;
unlink "$config{'imagebase'}/$image1$t";
}
Any problems, let me know..
Jayzfury
jay@specialengines.com
at
http://specialengines.com/auction
Please feel free to check us out when you get a chance!
#6, RE: Need Image Magick Help!
Posted by SportsNut on Jul-21-02 at 02:20 AM
In response to message #5
This does not work on Version 4 because in auction.pl there is no dispimage.
#7, RE: Need Image Magick Help!
Posted by Jayzfury on Jul-21-02 at 04:23 AM
In response to message #6
No.. (dispimage), I agree!
There is no such command name in the whole script.You misunderstood something here...
Sorry to hear that it's not working for you but $imagedisp is the key word here, and the auction.pl has this command through out the script. If you are having any problems getting things set up, let me know. It works great in 4.00D and has been for some time. I received the 4.00 early script and have been fine tuning out the bugs along with Richard. The new script's great! Check it out ( all tumbnails ) in action at http://specialengines.com/cgi-bin/auction/auction.pl?dispcat .. If you have ImageMagick on your host server or personal server, it will work fine for you! Laters...
Regards all,
Jayzfury
jay@specialengines.com
at
http://specialengines.com
#8, RE: Need Image Magick Help!
Posted by djblamire on Jul-21-02 at 04:36 AM
In response to message #7
Does Image Magick compress images - therefore reducing the loading time of images ?Thanks
Daniel
www.avabid.com
#9, RE: Need Image Magick Help!
Posted by Jayzfury on Jul-21-02 at 04:55 AM
In response to message #8
Hi,
Yes, ImageMagick compresses the original image file and re-manes it. Like say from .jpg to .jpgt or .gif to .gift ... A 50k file may be reduced to around 2k or less and also at what height and width you desire. If you do want a different size thumbnail picture, smaller the better. The ( 80 x 80 ) height and width is set in the command lines but can be changed to 75 x 75 or 60 x 60 for the smaller file sizes. Keep the 00 x 00 numbers equal. Hope this helps ya!
Jayzfury
jay@specialengines.com
at
http://specialengines.com/auction
#10, RE: Need Image Magick Help!
Posted by djblamire on Jul-21-02 at 05:35 AM
In response to message #9
Would this be fairly straight forward to setup on my dedicated server ??Any help appreciated.
Thanks
Daniel
#11, RE: Need Image Magick Help!
Posted by Jayzfury on Jul-21-02 at 04:52 PM
In response to message #10
Hello,
You will need the ImageMagick Program loaded onto your server.
Attached are some Instructions to follow and where to download.
Jayzfury
jay@specialengines.com
#12, RE: Need Image Magick Help!
Posted by Keith on Oct-07-02 at 05:55 PM
In response to message #11
Does anyone have imagemaick working on version 4?If so, can they share the code?
Thanks
#13, RE: Need Image Magick Help!
Posted by Jayzfury on Oct-08-02 at 04:31 PM
In response to message #12
Hi Keith,
I have left several notes of info on the ImageMagick stuff that can be downloaded for your use. If you would like to view the ImageMagick script in action, just visit http://specialengines.com/auction.
Remember, you must have ImageMagick on your hosting server for all this to work. Use a program like PerlDiver.pl or even Richard's copy of envtest.pl to check on what server modules are available for your use. Hope something helped here for ya. Laters...
Jayzfury
SE Auctions
jay@specialengines.com
at
http://specialengines.com/auction
#14, RE: Need Image Magick Help!
Posted by Matt Chiles on Jan-06-03 at 06:19 PM
In response to message #13
I've been working for weeks to get ImageMagick working and I have finally come to the conclusion after much research, learning and testing that my internet host doesn't have it set up properly and isn't willing to do anything about it.So I am looking for a new host, specifically one that will work with ImageMagick without any problems. Those who have ImageMagick up and running, do you have any recommendations? Thanks!
-Matt :)
#15, RE: Need Image Magick Help!
Posted by Jayzfury on Jan-07-03 at 02:34 AM
In response to message #14
HI
Try http://www.powweb.com
I have been using them for some time now and they can support this auction script very well. This includes ImageMagick.. Good luck..
Jayzfury
jay@specialengines.com
at
http://specialengines.com
#16, RE: Need Image Magick Help!
Posted by djblamire on Jan-07-03 at 03:15 AM
In response to message #15
I have plenty of space & bandwidth free on my dedicated server. I would be more than willing to sell some of this off.It doesn't currently have image magick setup, but that shouldn't be a problem.
Thanks
Daniel.
#17, RE: Need Image Magick Help!
Posted by ervasti on Feb-23-04 at 06:31 PM
In response to message #10
LAST EDITED ON Feb-23-04 AT 06:32 PM (GMT)
Hi Jay!I am trying to use the above instructions for integrating I::M into MakeBid and the code that calls the $image1 in deluxe 4.1 is just different enough that it is spooking me a bit.
Is there any chance you could post an updated integration process on the dcforums? It'd be most appreciated. =]
PS. My link is wrong on the signature-correct is:
https://quty.com/
#18, RE: Need Image Magick Help!
Posted by Jayzfury on Feb-23-04 at 06:43 PM
In response to message #10
Greetings All,
I have changed my contact email address (jay@specialengines.com) due to too much outrageous & insulting spam messages. I will see what I can do for those that are hosted on PowWeb and wish to set up ImageMagick, use this new address:
jayzfury@specialengines.com
All images on my site are thumbnails and were produced by ImageMagick. Please be patient if I don't answer right away, I work very late at night till morning when internet traffic is a bit slower. Have a good day!
Regards,
Jayzfury
at
Jayzfury@specialengines.com
http://specialengines.com/auction
#19, RE: Need Image Magick Help!
Posted by Len on May-29-04 at 09:23 AM
In response to message #10
Hi Jayzfury
I followed all your instructions
on Richards forum
http://www.usanetcreations.com/dcforum/DCForumID3/75.htmlI get thumbnails in the auct-photos folder
and I have also updated the selleredit.pl which works perfectly
i.e. it removes the thumbnails etc.
The only problem I am having is I can-not get a thumbnail to display
what I want to do is
instead of the small camera icon in the Status earea it shows a thumbnail of the item and if there is no thumbnail it displays a nopic.gif I still want the other icons left i.e. new, buynow, etc.
Many thanks for any help
Best Regards
Len
#20, RE: Need Image Magick Help!
Posted by Len on May-30-04 at 11:21 AM
In response to message #19
Hi Jayzfury
I now get the thumnail on my home page.
and Featured Picture GALLERYQuestion
--------
Have you sorted out a the code so an image hosted else where
can be seen, as at the moment it shows a broken link.
Best Regards
Len
#21, RE: Need Image Magick Help!
Posted by Jayzfury on May-30-04 at 10:34 PM
In response to message #20
LAST EDITED ON May-30-04 AT 10:36 PM (GMT)
Hi Len,
Yes, I have sorted out this problem just last night for you. Still testing, so I can turn the option on for loading images from other host when this works with out errors. Looks good so far. I used 1 line from a suggestion from Matt's post. I will keep ya all posted. Laters...
Jayzfury
at
http://specialengines.com/auction I will post the code to share when I'm sure it works a while without errors.
#22, RE: Need Image Magick Help!
Posted by mchiles on May-30-04 at 11:56 PM
In response to message #21
FYI to those following this thread:See this new thread: http://www.usanetcreations.com/dcforum/DCForumID3/187.html for info on my new way to create a thumb for people who select to have their image hosted off of your site instead of downloading an image. It will work with ImageMagick too, but since I don't use ImageMagick with my site I don't have that method detailed.
Jay, if you try this, please follow up on my thread so people can see how to make it work with ImageMagick. And thanks again Jay for all the help you have been to me and many others on this site in getting thumbs working!
-Matt :)
www.auctionbrick.com
#23, RE: Need Image Magick Help!
Posted by Len on May-31-04 at 10:19 AM
In response to message #22
Hi Jayzfury
Many thanks for your help online, and off!
There is no dought Richard's Software is one of the best!
But with added thumbnail's it's going to be even better!!!
thank's again to yourself and Matt for all your kind help!!!!!!!.
Best Regards
Len