Jump to content



Latest News: (loading..)

* * * * * 10 votes

Support thread for the Image Magic contribution


  • Please log in to reply
1270 replies to this topic

#1221   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 12 April 2009 - 02:17 PM

Oh. no. just tested out the imagemagic.php of the package..... and it failed. i will do a small test. and then i will post the fix or the whole file. asap



sadly enough. it is the same. with no errors. i just forgot to set the rotht owner on the file. to be read correctly :( i had just hoped there was an error in the package.

Edited by mortal, 12 April 2009 - 02:26 PM.


#1222   Lgn.Magic

Lgn.Magic
  • Members
  • 49 posts
  • Real Name:Fabien

Posted 12 April 2009 - 02:31 PM

Wah, Thank a lot for such a fast reply, it's really appreciated.

Looking forward your new reply.

Also how about that undefinited variable into line 57

<b>Notice</b>:  Undefined variable: page in <b>...\www\catalog\imagemagic.php</b> on line <b>57</b><br />

55 if ($_GET['page'] == "prod_info") {
56	  $thumbnail_size=4;
57	  $page_prefix = $page ."prod_info_";
58 }

the numbers are not in the code, i added them to let u see the whole function and which is on wich line.

does it seems alright to you?

thank you again for your time and such a fast support.

Greetings, Fabien.

Also as a last note, i saw somewhere in the theard that contrib was deleted at a time..was it a problem with unrelease under GPL lisence...there is no problem using contrib as it's right? since imagemagic doesn't show standard GPL lisence at top of the page.

#1223   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 12 April 2009 - 02:43 PM

i just tried to replace all my files and functions with those from the contribution package and it all worked fine. and i checked your line. and its the same as mine.

i dont know why it was deleted. if it was a metter of support, or licence. i dont know. i never heard such things before, but im not saying they are untrue. but when posting them here at osc. i guess its GPL no matter what. and even since its clearly stated that some of the code is from another contribution.

i will try my best to troubleshoot on this. but since im not the author. and dont have full insight in this code. i canot promise anything


Did you set this "calculate image sizes to true "
and try disabling both cache options in imagemagic admin settings

Edited by mortal, 12 April 2009 - 02:51 PM.


#1224   Lgn.Magic

Lgn.Magic
  • Members
  • 49 posts
  • Real Name:Fabien

Posted 12 April 2009 - 03:17 PM

Yeah

calculate image size in configuration/image is to true

i just tried set to false both

cache thumbnails on the server
and
cache thumbnails in user brower

and i still don't have pic showing.

-----
Ill go through this so you can tell me if i did something wrong or forgot something, it may come from there with that undefinited function error.

1. added sql to my database
2. i uploaded

- imagemagic.php to catalog directory

- imagemagic folder to catalog/includes

3. modifed/added code into:

- added the whole "function tep_cfg_readonly($value){" at the end of catalog/includes/funtions/general.php before the last ?>

i did right there? it's not in catalog/admin/includes/functions/general.php
right?
If i remember right, the first time i installed i added code in admin/includes/functions/general.php but it didn't worked
after i saw admin part was deleted
so i added into catalog/includes/functions/general.php instead and it worked..creating thumbnails folder and so on..showing imagemagic.php into picture URL..

- modified the function "function tep_image" into  catalog/includes/functions/html_output.php

the whole image function strat from

function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {

to

 return $image;
 }

the whole function is very long and is not only 5/6 lines long
Right?

if im not wrong on last 1.14 version of i/m there is nothing to change in catalog/admin files.

did i forgot or did something bad in processing intall?

Thanx again trying to help me fix my problem!!

#1225   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 12 April 2009 - 05:01 PM

i dont think the problem lies there. as long as you see imagemagic.php? as the picture. then the function is working. i think the problem lies in the imagemagic.php file somewhere.

and yes. the whole function is pretty long. if only there were som more errors. it seems

you shold be able to comment this line out. as it only determines the specific height on product info.
	  $page_prefix = $page ."prod_info_";

do you see any errors when comment all those lines out ?

#1226   Lgn.Magic

Lgn.Magic
  • Members
  • 49 posts
  • Real Name:Fabien

Posted 12 April 2009 - 05:20 PM

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, 12 April 2009 - 05:22 PM.


#1227   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 12 April 2009 - 05:31 PM

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.

#1228   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 12 April 2009 - 05:38 PM

Hmm. just discovered that image watermarks does work on my serer anyways. but it seems to only work on .jpg images.

see it in action here  http://sparkle.oscom.dk/gesrg-p-28.html

i know that ppl. inhere have been requesting to see it

#1229   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 12 April 2009 - 05:41 PM

To Fabien

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

#1230   Lgn.Magic

Lgn.Magic
  • Members
  • 49 posts
  • Real Name:Fabien

Posted 12 April 2009 - 06:39 PM

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

#1231   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 12 April 2009 - 06:44 PM

View PostLgn.Magic, on Apr 12 2009, 07:39 PM, said:

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

#1232   Lgn.Magic

Lgn.Magic
  • Members
  • 49 posts
  • Real Name:Fabien

Posted 12 April 2009 - 07:29 PM

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, 12 April 2009 - 07:31 PM.


#1233   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 12 April 2009 - 07:45 PM

View PostLgn.Magic, on Apr 12 2009, 08:29 PM, said:

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

#1234   Lgn.Magic

Lgn.Magic
  • Members
  • 49 posts
  • Real Name:Fabien

Posted 12 April 2009 - 08:03 PM

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, 12 April 2009 - 08:04 PM.


#1235   mondofood

mondofood
  • Members
  • 27 posts
  • Real Name:Michael
  • Gender:Male

Posted 13 April 2009 - 10:29 PM

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)

#1236   mondofood

mondofood
  • Members
  • 27 posts
  • Real Name:Michael
  • Gender:Male

Posted 13 April 2009 - 11:42 PM

View Postmondofood, on Apr 13 2009, 11:29 PM, said:

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.

#1237   mightyx

mightyx
  • Members
  • 54 posts
  • Real Name:N. Maur
  • Gender:Male

Posted 15 April 2009 - 02:44 PM

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?

#1238   Brollox

Brollox
  • Members
  • 73 posts
  • Real Name:Jaco
  • Gender:Male
  • Location:South Africa

Posted 20 April 2009 - 06:59 AM

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

#1239   mortal

mortal
  • Members
  • 139 posts
  • Real Name:jh

Posted 20 April 2009 - 07:32 AM

View PostBrollox, on Apr 20 2009, 06:59 AM, said:

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 ?

#1240   Brollox

Brollox
  • Members
  • 73 posts
  • Real Name:Jaco
  • Gender:Male
  • Location:South Africa

Posted 20 April 2009 - 07:44 AM

View Postmortal, on Apr 20 2009, 09:32 AM, said:

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?