Latest News: (loading..)
tomjmul

Support thread for the Image Magic contribution

1,273 posts in this topic

ahhhh !!!

 

here is what i did

 

commented both function here for prod info and also pop up

if you don't comment out pop up aswell, it result in blank image when opening pop up

if ($_GET['page'] == "prod_info") {
  $thumbnail_size=4;
// $page_prefix = $page ."prod_info_";
}
if ($_GET['page'] == "popup") {
  $thumbnail_size=5;
  // $page_prefix = $page ."prod_info_";
}

 

then commented the whole block

 

	//add selected custom filters to the image
//	if (BRIGHTNESS_ADJUST != "0") adjust_brightness(&$tmp_img,BRIGHTNESS_ADJUST);
//	if (CONTRAST_ADJUST != "0") adjust_contrast(&$tmp_img, CONTRAST_ADJUST);
//	if ($image_watermark) watermark_image(&$tmp_img, DIR_FS_CATALOG.'includes/imagemagic/watermarks/'.WATERMARK_IMAGE ,WATERMARK_IMAGE_POSITION, WATERMARK_IMAGE_OPACITY, WATERMARK_IMAGE_MARGIN);
//	if ($frame) frame(&$tmp_img, FRAME_WIDTH, FRAME_EDGE_WIDTH, FRAME_COLOR, FRAME_INSIDE_COLOR1, FRAME_INSIDE_COLOR2);
//	if ($bevel) bevel (&$tmp_img, BEVEL_HEIGHT, BEVEL_HIGHLIGHT, BEVEL_SHADOW);
//	if ($text_watermark) watermark_text(&$tmp_img, WATERMARK_TEXT, WATERMARK_TEXT_SIZE, WATERMARK_TEXT_POSITION, WATERMARK_TEXT_COLOR, 'includes/imagemagic/fonts/'.WATERMARK_TEXT_FONT, WATERMARK_TEXT_OPACITY, WATERMARK_TEXT_MARGIN, WATERMARK_TEXT_ANGLE);

 

in fact i commented all line i had error with...and now images are showing and i/m does his job.

 

I just hope it won't make other problem.

 

i need to get dinner now i'm really hungry :D

 

when im back ill try use some watermarks to see if it works or if commenting the last code break up watermark use fucntion.

 

Thanx a lot for you help. gotta post about this watermark test in few minutes

Edited by Lgn.Magic

Share this post


Link to post
Share on other sites

watermark will not work. it is made by one of those lines.

 

try this function tester to see if your server even supports watermark

 

<?php
if (function_exists('imageantialias')) {
echo "imageantialias functions are available.<br />\n";
} else {
echo "imageantialias functions are not available.<br />\n";
}
?>

 

NOTE. my server does not support this. but i can still use text watermark. but not image watermark.

Share this post


Link to post
Share on other sites

To Fabien

 

i just tested out "Output GIFs as JPEGs" and it fails bigtime. make sure thats not the case with you also

Share this post


Link to post
Share on other sites

ok right, watermark not working it seems, but it's not such a big deal because i don't think i'll use it anyways. iwas wondering if it would block this function when i posted about it above.

 

ill probably have a watermark need on very few amount of pictures... so ill just watermark them with photoshop or some other prog that add automaticaly watermarks.

 

Only last "problem" i have is i/m server cache need to be turned off if i want images to be shown.

 

no problem with i/m cache on in browser's user...works if on or off.

 

server cache on would be better since it would not creat thumbnails each time page is beeing visited. got any clue about this? or i'll have to let it turned off

Share this post


Link to post
Share on other sites
ok right, watermark not working it seems, but it's not such a big deal because i don't think i'll use it anyways. iwas wondering if it would block this function when i posted about it above.

 

ill probably have a watermark need on very few amount of pictures... so ill just watermark them with photoshop or some other prog that add automaticaly watermarks.

 

Only last "problem" i have is i/m server cache need to be turned off if i want images to be shown.

 

no problem with i/m cache on in browser's user...works if on or off.

 

server cache on would be better since it would not creat thumbnails each time page is beeing visited. got any clue about this? or i'll have to let it turned off

 

 

only thing i can emagine is path or rights

Share this post


Link to post
Share on other sites

im not sure i understand quit well what you mean.

with path u mean my settings pointing to wrong direction?

and with rights you mean wrong folder attribute 777 and so on?

 

I seems to have an issue with cache anyways. Not talking about i/m cache options

 

If i turn on oS cache in configuration/cache....then my categories names on my site are gone...very weird..

I've set it right i think..folder cache directory is /tmp/ and i've created that folder with 777 autorization.

 

then if if i go to tools/cache control...with folder created or not, i got a warm message in red at top telling my cache folder doesn't exit and i need to specify it in configuration/cache.....(wich is already done :s)

 

My question is, do i have a problem on my configure.php in admin/includes

 

i don't see anything in that file mentioning cache text....except define('STORE_SESSIONS', 'mysql'); but this is not the same i believe

 

i/m chache is using same patch as Os cache (/tmp/ in my case)? or the thumbnails folder is considered as cache folder for this 2 options?

 

Got any clue or i need to make more search on forums and so on.

 

Keep in mind im working on local install and not on a online server

 

Thanx in advance

Edited by Lgn.Magic

Share this post


Link to post
Share on other sites
im not sure i understand quit well what you mean.

with path u mean my settings pointing to wrong direction?

and with rights you mean wrong folder attribute 777 and so on?

 

I seems to have an issue with cache anyways. Not talking about i/m cache options

 

If i turn on oS cache in configuration/cache....then my categories names on my site are gone...very weird..

I've set it right i think..folder cache directory is /tmp/ and i've created that folder with 777 autorization.

 

then if if i go to tools/cache control...with folder created or not, i got a warm message in red at top telling my cache folder doesn't exit and i need to specify it in configuration/cache.....(wich is already done :s)

 

My question is, do i have a problem on my configure.php in admin/includes

 

i don't see anything in that file mentioning cache text....except define('STORE_SESSIONS', 'mysql'); but this is not the same i believe

 

i/m chache is using same patch as Os cache (/tmp/ in my case)? or the thumbnails folder is considered as cache folder for this 2 options?

 

Got any clue or i need to make more search on forums and so on.

 

Keep in mind im working on local install and not on a online server

 

Thanx in advance

 

try to remove forwardslash in front of cache. so it becomes "/cache"

 

im not sure if it solves your problem. i use "/cache/thumbnails" for im

Share this post


Link to post
Share on other sites

Ok seems it's not fixing without slash. I'll have a look on forums and do few search about it. Pretty sure this Os cache prob is what is messing up i/m when i turn cache on...it definitly should be working. i must have a mistake somewhere. Or maybe it's just because i run a local install...but i don't see any reason for it to be different than on a live server...easy php is supposed to remplace a live server and works "the same way".... Don't bother about it, ill find it myself i guess.

 

Anyways Thanx a lot for your time and support !!!

 

Best Regards, Fabien

Edited by Lgn.Magic

Share this post


Link to post
Share on other sites

Parse error: syntax error, unexpected '}' .... includes/functions/html_output.php on line ...

 

I've searched all 60 some odd pages of this forum topic and have seen lots of references to this issue but no resolve yet. Can someone please post the fix for this issue.

 

Thank you.

 

If you want to see the code it is below:

 

(ps: I tried posting the contents of html_output.php but oscommerce.com kept on timing out)

Share this post


Link to post
Share on other sites
Parse error: syntax error, unexpected '}' .... includes/functions/html_output.php on line ...

 

I've searched all 60 some odd pages of this forum topic and have seen lots of references to this issue but no resolve yet. Can someone please post the fix for this issue.

 

Thank you.

 

If you want to see the code it is below:

 

(ps: I tried posting the contents of html_output.php but oscommerce.com kept on timing out)

 

For those of you that have this issue, ensure you delete the entire tep_image function. from:

function {

all the way to the ending: }

 

I missed most of the function, my eyes are crooked and didn't see that it ended farther down than I thought.

Share this post


Link to post
Share on other sites

Has someone get this contribution to work with the lightbox product images and can post the code here?

 

I figured out, that this contrib detects if the picture is displayed in the "popup_image.php" file and therefore

uses image magic to process it. The code for that is in html_outpu.php (search for popup). Since lightboxed images

are not displayed in popup_image.php, image magic doesn't process them...

 

Has anybody a solution that can be posted or pm?

Share this post


Link to post
Share on other sites

Hi Guys

 

I have a problem with image size. I need a rather big image for good detail for enlarging the product image, because of the type of product we want to sell. Is there a way that I could use a separate image for the normal thumbnails, and a different larger image just for the enlarge function.

 

by the way I checked and find no imagemagic files anywhere on my shop. Would image magic give you this "different image just for the enlarge popup?

 

Jaco

Share this post


Link to post
Share on other sites
Hi Guys

 

I have a problem with image size. I need a rather big image for good detail for enlarging the product image, because of the type of product we want to sell. Is there a way that I could use a separate image for the normal thumbnails, and a different larger image just for the enlarge function.

 

by the way I checked and find no imagemagic files anywhere on my shop. Would image magic give you this "different image just for the enlarge popup?

 

Jaco

 

 

well. popup be default uses the full size of the image. do you use the default popupfunction ?

Share this post


Link to post
Share on other sites
well. popup be default uses the full size of the image. do you use the default popupfunction ?

 

I think so Jan.

 

I'm not sure though. How do I check?

Share this post


Link to post
Share on other sites
well. popup be default uses the full size of the image. do you use the default popupfunction ?

 

Sorry I mean Mortal (busy talking to Jan about sppc at the same time :blush: )

 

$Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $

 

Found this does it help?

Edited by Brollox

Share this post


Link to post
Share on other sites
Sorry I mean Mortal (busy talking to Jan about sppc at the same time :blush: )

 

$Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $

 

Found this does it help?

 

 

Hi. if you did not alter anything on the popup.php file. or the link in product_info.php. and the URL when showin popups is popup_image.php then you use default function. and then its showing you the full size image.

 

i do not recommend forcing the images to be bigger than original. it does not look good.

 

but if you just want to control the size om the images in popup. you can do this manually by editing

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

TO

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'],' desired width',' desierd height'); ?>

 

and please consider only setting one of the parameteres. to make the picture look better

 

The line is found in popup_image.php in root catalog folder

 

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'],'600',''); ?>

Edited by mortal

Share this post


Link to post
Share on other sites
Hi. if you did not alter anything on the popup.php file. or the link in product_info.php. and the URL when showin popups is popup_image.php then you use default function. and then its showing you the full size image.

 

i do not recommend forcing the images to be bigger than original. it does not look good.

 

but if you just want to control the size om the images in popup. you can do this manually by editing

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

TO

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'],' desired width',' desierd height'); ?>

 

and please consider only setting one of the parameteres. to make the picture look better

 

The line is found in popup_image.php in root catalog folder

 

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'],'600',''); ?>

Thank You Mortal

 

It is using the default popup.php There are no links to a different image file for the pupup that I could find.

 

What I'd like to do is use a small thumbnail image on the index page and when you want to enlarge using the popup link on the product_info page the popup should use a different larger image. Like I said I have to use a rather large image to get the required detail on the popup, however the same large image gets resized/recalculated for all the thumbnails on the index page at the moment which makes the site dediously slow.

is there an addon or something I could install to solve this or can we just specify a link somehwere in popup.php that will fetch a different jpeg file?

I dunno.

Share this post


Link to post
Share on other sites

Hi Jaco.

 

allright. i think i understand.... you would like to be able to specify diffrent image sizes depending on wether the customer clicks on a image to enlarge on either index or product_info ?

here you simply copy popup_image.php and rename it. and from index.php you alter the target popup to that name.

 

but im not sure if you mean that you would like to be able to specify a difrent size on the thumbs in index versus the images on product info.

the imagemagic lets you specify a specific size for the product image on product_info.php if thats what you are looking for.

Share this post


Link to post
Share on other sites

Hi Mortal

 

No I think we're missing each other.

 

I would like the popup to use a different image altogether than the image index.php and product_info.php uses for their respective thumbnails.

 

This would enable me to use an image of maybe 600Kb for the popup and a different 60Kb image for the thumbnails. When the customer view index or product_info download should be quick and snappy. But when he wants to enlarge the image to see the detail, now popup.php uses another larger image and the customer wont mind if download is a tad slow.

 

is this part of Image Magic? (which i dont have installed by the way)

 

Thanks again.

Edited by Brollox

Share this post


Link to post
Share on other sites
Hi Mortal

 

No I think we're missing each other.

 

I would like the popup to use a different image altogether than the image index.php and product_info.php uses for their respective thumbnails.

 

This would enable me to use an image of maybe 600Kb for the popup and a different 60Kb image for the thumbnails. When the customer view index or product_info download should be quick and snappy. But when he wants to enlarge the image to see the detail, now popup.php uses another larger image and the customer wont mind if download is a tad slow.

 

is this part of Image Magic? (which i dont have installed by the way)

 

Thanks again.

 

thats caching the images. and that is a part of imagemagic.

Share this post


Link to post
Share on other sites
thats caching the images. and that is a part of imagemagic.

 

Ok great I'll install imagemagic.

 

THanks

Share this post


Link to post
Share on other sites

Hi Mortal

One more stupid question before I attempt this.

I'm running 2.2 RCI the installation instructions says osCommerce 2.2-MS2 as a requirement

am I fine or do I have a problem.

 

Jaco

Share this post


Link to post
Share on other sites
Hi Mortal

One more stupid question before I attempt this.

I'm running 2.2 RCI the installation instructions says osCommerce 2.2-MS2 as a requirement

am I fine or do I have a problem.

 

Jaco

 

 

hi. im actually not sure. but i think you are fine

Share this post


Link to post
Share on other sites

Got a question.. I searched if there was an answer, but I couldn't find one..

 

When imagemagic generates the thumbnails, the "fill-up" colour, is black.. Is there any way to change this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now