chrometweaks.org

I need a free iPage web host where I can make sub pages..?

Click Here To View All Answers...


First question I got is I need a free iPage web host where I can make sub pages..? Many thanks for any comment. Another question I got... My thumbnails are extremely choppy and unclean looking. The full size image is crisp. Is there some type of fix for this?.

Click on the www below for a looksie..

Thanks a bunch..

Comments (22)

Hmm... I need to find out myself. I don't know what is the answer. I'll do some poking around and get back to you if I find an decent answer. You should email the people at iPage as they probably could answer your iPage question..

Comment #1

Sounds like alot of work.

Probably going to have about 500 products so guess I'll put that on the back burner for now, thanks for the help..

Comment #2

I've had good luck with the "on the fly" auto thumbnailer contribution...

Comment #3

Use an automatic thumbnailer...there are several contributions..

One thing I can add is if you have GIF images most don't support that (err, rather the GD lib doesn't support write). To get around this, change the GIF function to createimagefromstring() and then write the image with imagejpeg(). This may not produce highest quality thumbnails but it sure beats a simple resize...

Comment #4

Another option is to use png instead of gif...

Comment #5

Of course I forgot the simple answer....

I was working on a script for my client to generate his upload feed for Amazon and they only accept JPG's. What to do? His server does not support GIF write and Amazon does not accept PNG's. The only option I had was to fopen() the GIF and create the image from the string...then save as a JPG...

Comment #6

BTW, here is the code I use for it....

It is used strictly for GIF's and not other formats that have read/write support..

// Resize an image if it exceeds a predefined size..

Function imageresize($image, $newimage, $newwidth = 500, $newheight = 500) {.

If (is_file($image)) {  //does it exist?.

 $fd = @fopen($image,"r");.

 $image_string = fread($fd,filesize($image));.

 fclose($fd);.

 $im = imagecreatefromstring($image_string);.

 $width = imagesx($im);.

 $height = imagesy($im);.

//check proportions.

If ($newheight && ($width < $height)) {.

 $newwidth = ($newheight / $height) * $width;.

 } else {.

  $newheight = ($newwidth / $width) * $height;.

 }.

 //make the new image with proportions.

 $newim = imagecreatetruecolor ($newwidth, $newheight);.

//copy it over.

Imagecopyresampled($newim,$im,0,0,0,0,$newwidth,$newheight,$width,$height);.

 //save it to file.

Imagejpeg($newim, $newimage, 80); .

//kill the temps.

Imagedestroy($im);.

 imagedestroy($newim);.

//good to go.

Return true;.

} else {.

  //image wasn't a file.

 return false;.

}.

}.

This post has been edited by.

Chemo.

: 06 September 2004, 17:14..

Comment #7

Hey, similar problem here (I suspect it's a universal one). I have a dream and the drive to implement it, just... not the knowledge. So I'm hoping a PHP guru can send me in the right direction..

What I want to do is define the "width" of the picture, but not the height. Just leave that attribute out. It should resize proportionally..

The code in product_info.php is this:.

Tep_image(DIR_WS_IMAGES$product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"').

Somewhere, in the depths of all the files, the image is defined to require all the attributes in that list. Where is that definition? Can I just go to that page and remove the height requirement? Would I need to poke at the SQL too?.

To take it a step further, I also want the width definition to be different than that of the infoboxes. A bigger image in the product displays..

It's alright if it can't all be defined by the store owner in the admin panel. But it would be really great to be able to make it work via the code. Any ideas?.

Sarah..

Comment #8

I had the same issue setting up a customer site. She had spent tons of money on professional photos of her products, but some are taller than others and look horrible on the product description pages. I solved the problem by doing two things:.

1. Under Admin/Configuration/Images set Calculate Image Size to false..

2. I modified the following call for the product image on the product_info.php script:.

<?php echo '<a href="'tep_href_link(DIR_WS_IMAGES$product_info['products_image'])'" target="_blank">'tep_image(DIR_WS_IMAGES$product_info['products_image'], $product_info['products_name'], '', '', 'hspace="2" vspace="2"')'<br>''</a>'; ?>.

Send blank '' strings for height and width replacing SMALL_IMAGE_HEIGHT var. I also commented out the "view larger image" tag..

Now all the product photos are not resized. Hope this helps..

Mike..

Comment #9

Thank you Mike! Your solution gave me the info I needed to get to my own answer..

Here it is:.

The goal:.

Images that resize proportionately, based on width..

The solution:.

Go to the Admin Panel -> Configuration -> Images.

1. Set Image Widths to your desired width.

2. Set Image Heights to an empty string. Just delete the current number and hit save..

3. Set "Calculate Image Size" to "True"..

Voila! No more mangled images!.

I also hit my "sub-goal" while I was at it..

The goal:.

Product Info images that are larger than the infobox images, but still resized proportionately..

The solution:.

Go to catalog/product_info.php.

1. Find the following code:.

<script language="javascript"><!.

Document.write('<?php echo '<a href="javascript:popupWindow(\\\''tep_href_link(FILENAME_POPUP_IMAGE, 'pID='$product_info['products_id'])'\\\')">'tep_image(DIR_WS_IMAGES$product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"')'<br>'TEXT_CLICK_TO_ENLARGE'</a>'; ?>');.

//></script>.

<noscript>.

<?php echo '<a href="'tep_href_link(DIR_WS_IMAGES$product_info['products_image'])'" target="_blank">'tep_image(DIR_WS_IMAGES$product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"')'<br>'TEXT_CLICK_TO_ENLARGE'</a>'; ?>.

</noscript>.

2. Replace both instances of SMALL_IMAGE_WIDTH with '[desired width]', example: '200'.

3. Replace both instances of SMALL_IMAGE_HEIGHT with an empty string, denoted by two single quotes: ''.

My Code:.

<script language="javascript"><!.

Document.write('<?php echo '<a href="javascript:popupWindow(\\\''tep_href_link(FILENAME_POPUP_IMAGE, 'pID='$product_info['products_id'])'\\\')">'tep_image(DIR_WS_IMAGES$product_info['products_image'], addslashes($product_info['products_name']), '200', '', 'hspace="5" vspace="5"')'<br>'TEXT_CLICK_TO_ENLARGE'</a>'; ?>');.

//></script>.

<noscript>.

<?php echo '<a href="'tep_href_link(DIR_WS_IMAGES$product_info['products_image'])'" target="_blank">'tep_image(DIR_WS_IMAGES$product_info['products_image'], $product_info['products_name'], '200', '', 'hspace="5" vspace="5"')'<br>'TEXT_CLICK_TO_ENLARGE'</a>'; ?>.

</noscript>.

Good luck everybody!..

Comment #10

You actually don't have to do any other that. Just don't define either Height or Width (in the osC admin panel) and the images will automatically constrain themselves to the one variable you have set, and keep their ratio too...

Comment #11

My thumbnails are extremely choppy and unclean looking. The full size image is crisp. Is there some type of fix for this?.

Click on the www below for a looksie..

Thanks a bunch..

Comment #12

This is generally caused by the thumbnail image ratios not matching the original image's size ratio..

For example, if your main image is 250 x 350 but your thumbnails are 100 x 200 it will look very bad..

The best thing to do, which also may not be possible, is to have all of your original images the same size or at least the same ratio (e.g. 1:1.5)..

Another thing to try is one of the thumbnail contributions that either resample the original image into a new thumbnail or where you can upload a specific thumbnail image for each product..

This post has been edited by.

Daemonj.

: 06 September 2004, 03:38..

Comment #13


This question was taken from a support group/message board and re-posted here so others can learn from it.