NOTE: Always state the software package and version you have
when asking questions so you will get the correct answer,
as it does make a big difference in the answers you'll get!

USANet Creations
Support and Discussion Forums

Subject: "Need Image Magick Help!"   Page 1 | 2 | 3 | Previous Topic | Next Topic
Printer-friendly copy     Email this topic to a friend    
Conferences MakeBid Auction users addons and fixes Topic #75
Reading page 1 of 3 pages
Jayzfury click here to view user rating
Charter Member
73 posts, 2 feedbacks, 4 points
Jun-18-02, 05:49 PM (CST)
Click to EMail Jayzfury Click to send private message to Jayzfury Click to view user profileClick to add this user to your buddy list  
"Need Image Magick Help!"
 
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


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Jayzfury click here to view user rating
Charter Member
73 posts, 2 feedbacks, 4 points
Jun-25-02, 04:18 PM (CST)
Click to EMail Jayzfury Click to send private message to Jayzfury Click to view user profileClick to add this user to your buddy list  
1. "RE: Need Image Magick Help!"
 
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/auction

Thumbs 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


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Thumbnails
unregistered user
Jun-25-02, 10:54 PM (CST)
 
2. "RE: Need Image Magick Help!"
 
   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


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
djblamire click here to view user rating
Member since Jun-5-02
162 posts, 1 feedbacks, 1 points
Jul-03-02, 05:46 PM (CST)
Click to EMail djblamire Click to send private message to djblamire Click to add this user to your buddy list Click to send message via ICQ  
3. "RE: Need Image Magick Help!"
 
   Is Image Magick fairly simple to install on a server?? - Any recommendations on integrating it with Makebid Auctions would be appreciated.

Thanks
Daniel.


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Jayzfury click here to view user rating
Charter Member
73 posts, 2 feedbacks, 4 points
Jul-04-02, 04:09 AM (CST)
Click to EMail Jayzfury Click to send private message to Jayzfury Click to view user profileClick to add this user to your buddy list  
4. "RE: Need Image Magick Help!"
 
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


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Jayzfury click here to view user rating
Charter Member
73 posts, 2 feedbacks, 4 points
Jul-17-02, 03:50 PM (CST)
Click to EMail Jayzfury Click to send private message to Jayzfury Click to view user profileClick to add this user to your buddy list  
5. "RE: Need Image Magick Help!"
 
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!


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
SportsNut
unregistered user
Jul-21-02, 02:20 AM (CST)
 
6. "RE: Need Image Magick Help!"
 
   This does not work on Version 4 because in auction.pl there is no dispimage.


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Jayzfury
unregistered user
Jul-21-02, 04:23 AM (CST)
 
7. "RE: Need Image Magick Help!"
 
   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


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
djblamire click here to view user rating
Member since Jun-5-02
162 posts, 1 feedbacks, 1 points
Jul-21-02, 04:36 AM (CST)
Click to EMail djblamire Click to send private message to djblamire Click to add this user to your buddy list Click to send message via ICQ  
8. "RE: Need Image Magick Help!"
 
   Does Image Magick compress images - therefore reducing the loading time of images ?

Thanks
Daniel
www.avabid.com


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Jayzfury click here to view user rating
Charter Member
73 posts, 2 feedbacks, 4 points
Jul-21-02, 04:55 AM (CST)
Click to EMail Jayzfury Click to send private message to Jayzfury Click to view user profileClick to add this user to your buddy list  
9. "RE: Need Image Magick Help!"
 
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


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
djblamire click here to view user rating
Member since Jun-5-02
162 posts, 1 feedbacks, 1 points
Jul-21-02, 05:35 AM (CST)
Click to EMail djblamire Click to send private message to djblamire Click to add this user to your buddy list Click to send message via ICQ  
10. "RE: Need Image Magick Help!"
 
   Would this be fairly straight forward to setup on my dedicated server ??

Any help appreciated.

Thanks
Daniel


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote


Page 1 | 2 | 3 | Conferences | Topics | Previous Topic | Next Topic
Rate this topic Rate this topic