Jump to content
Sign in to follow this  
tomjmul

Support thread for the Image Magic contribution

Recommended Posts

You don't need to put it ON ...

The previous link you gave DOES give (somehow) the reason why the images don't display ...

 

What would be useful for ANYONE to help you (and not EXCLUSIVELY ME) would be to retrace your steps...

 

I have done all correct!!But the images in my store does not display !

I have change the path in configure.php and not result !

 

That's LIGHT info : you have done all correct from ... ? The official installation procedure ? The hints that were given here and there ?

There could be tons of reason why the module doesn't work ...

 

Without any background, no one can help you ...

Share this post


Link to post
Share on other sites

Well ... let?s go.I gone explain everything ... step by step.

I install Image Magic V1.15 (tomjmul 20 Jun 2006 ) with this instructions " http://www.celtware.com/im/instructions.php " . The sql file i have installed is that who comes with this contribuition(and not the one in the instructions page).

Then i follow step by tep this page "http://www.celtware.com/im/instructions.php " .

The Optional Steps i don?t make.

The Broken link in my site is this " http://www.atualoja.com/imagemagic.php?img...;h=78&page= "

Best regards ....

Share this post


Link to post
Share on other sites

Is there a way I can purge my thumbnail cache off my server. I tried to manually delete the files via WS-FTP but it said the files were protected.

 

 

I have been playing around with watermarks, and some are now showing the old one.

Share this post


Link to post
Share on other sites

I didn't want to muck up the contrib section with my own additions if nobody else thought them useful, so I'm going to post them here instead. Use them (or not) as you see fit. I had a problem when I installed this contrib where the aspect ratio of images would not be correct. It seems that for thumbnail images, it defaults to using the SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT as absolute widths and heights for the thumbnails, even if this changes the aspect ratio of the original image. I made this change to html_output.php, in the tep_image function (forgive my formatting, I'm new here)

 

 

if ($image_size) {

 

// NJ -- use the width + heights as suggested maximums

// rather than actual dimensions, if available

if ($width && $height) {

 

// Measure the deltas, if top heavy, resize height by zeroing width

if ( $image_size[1] > $height && ($image_size[1] - $height > $image_size[0] - $width)) {

$width=0;

}

elseif ($image_size[0] > $width) {

// Must be too wide, resize width by zeroing height

$height=0;

}

else {

// image size is same or smaller than maxes, display as-is

$width=0;

$height=0;

}

}

// NJ -- end my code

 

// Set the width and height to the proper ratio

if (!$width && $height) {

 

<snip>

 

So in any case where it receives an abslolute $width and $height, it will assume that as long as the image dimensions are larger than the width and/or height to scale and preserve aspect ratio using those as maximum values. I also made this change for the popup where I change the tep_image call like this:

 

 

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

 

 

and define these in the Images admin screen with the following sql (again, forgive my formatting, or lack thereof):

 

insert into configuration (configuration_id , configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order) values (2029, 'Max Popup Image Width', 'MAX_POPUP_IMAGE_WIDTH',800,'The maximum width that a popup window image can be',4,20);

 

insert into configuration (configuration_id , configuration_title, configuration_key, configuration_value,

configuration_description, configuration_group_id, sort_order) values (2030, 'Max Popup Image Height', 'MAX_POPUP_IMAGE_HEIGHT',600,'The maximum height that a popup window image can be',4,21);

 

This sets a maximum on the popup window. Sometimes it's easy if I have a large image from a digital camera if I just upload at native size rather than having to remember to scale it to a certain size, I can just set maximums and all images will adhere to that.

Share this post


Link to post
Share on other sites

I think there should be a timeout setting for the images. After maybe 5 seconds the popup image will disapear. Because I have quite a few fairly large images that take up the whole screen and may be difficult for a customer to know to move the image.

 

Take a look here to know exactly what I am talking about:

 

http://marcusecompressor.com/catalog/produ...products_id/223

 

 

The click on the image to enlarge it, and you will see my prediciment.

Share this post


Link to post
Share on other sites

Image Magic and Fancier Invoice & Packingslip conflict and how to fix it:

 

Just installed this contribution and the images are not displayed, and when checking the image link this error comes up:

Warning: chdir(): No such file or directory (errno 2) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 492

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 493

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 494

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 496

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 497
????JFIF??0kG?ȿd???}3?χ_?N/??j|?????1?????i;??&???????~?????? ???????g?????&??.??-?c?㗇?l????????? ???????g_???1?(?T???H?ڏ???? ???Z??_?ߌ?o?x?ş~8??~"???u???S??}??/???????%? ? '? S? ?? O?g?1????????0w?d??+??h?Qڿ؟?N?G???%??,?_0|,????0x??6? ?7?߇?3??????|?K?g?g??{??¾??}???????C??~~??~?~Կn?x??n?f|2? ?Ӿ\??^???????i?x???>~???RO???z??ϟ?u?o????????ǟ?>???e?|<?> ??z?Ɲ?|8??f|]??]?S?????????d??w???|v???????O?????o?????C?g?>'뿴???????j?? ?4f???^?-?Px??????,?????'???~?7c?x??|;???????? x??_??k>???? ?O?\?g?&W????c?o???????M???????]????ƽg???o??ᇀ???Yï?מ?????????N??/ۻ????5???M?v??6|??7??? xw? |?????^??l K?????/??????_|K???j/ x???&???^???P?n|s??&???????E????i_?? ah?k?Y?0?7??????&?џ?M??~?Q_?? ?n??*o?~$?? >!~˿??^?J?????ߴ???M?Ej?LJ?9????/ï??S???Eh߱_??????j?)7?}w?6??????O?~;???????>.?2?????_??6j???????????g??f?x??i??^|1? < ??h???$Z???????????9~ѿ?????Z?? ??do??? ???g?<? ???e?kv_ ?@??+???"???!?]??~,??~??>*?_?~?? <?믇?????wD??< ?i?,??ǰ\?ɾ ???o?(e??/ ??.?-????^???k:???:??_x???p??O,?+k?_??????o????2k^>Կf????g?W? ?~??w???/???I?+?A????????#ğ?i?'? ?=k?ϊ?Q??"????ee??N???˟??w???~ۿ?S_?K???$????a?e??s]? ??x?~???7?????????????x?_?s??W?????e???~ѿ?f/?U?s?~??????????&????<-?!? ?l??Ɠ?????????????X?*x???/????~.?L??1?k?[?^??'??e????N?S???/?M???????_|E?~??x'R????ٛ??o????W? ?=???| ??l?H???CI???c???]????~x?¿???E?h?4???(x????o?Z7?/???_?n??????^o|c?7?????< ???G??x????G?Q?x??h_ۇ???????S???ex??????/???????h??l?U?D??d}k?????&??????;_x????C?????%}ǁ<'?y???\???x?B?R??+P??+?ً????A?????_??<???x'K?? ?4??g?#¾'?5??u????\?ׇ?;????? ?????׮|I?Ӵ?;???/?>6???? \????'²?>???(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??

Probably is already posted, but i'm not gonna check all 40 pages to see exactly.

 

So, if somebody will get that error and has installed Fancier Invoice, here is the solution:

 

In catalog/imagemagic.php we have this:

if (file_exists('includes/local/configure.php')) {

//use local dev params if available

include('includes/local/configure.php');

} else {

// include server parameters

require('includes/configure.php');

}

require('includes/imagemagic/imagemagic.functions.php');

chdir (DIR_FS_CATALOG);

 

The original oscommerce-2.2ms2-051113 package, doesn't have any includes/local/configure.php. As the script says, when includes/local/configure.php is not there, it will go to includes/configure.php.

But, installing Fancier Invoice & Packingslip you must create a includes/local/configure.php which doesn't have what imagemagic.php is looking for, that's why that error comes up; imagemagic.php finds the includes/local/configure.php file, but with something else inside it.

 

To get rid of that error, i simply removed this code:

 

if (file_exists('includes/local/configure.php')) {
  //use local dev params if available

} else {
// include server parameters
require('includes/configure.php');

 

and now what i have in my imagemagic.php is this:

include('includes/configure.php');

require('includes/imagemagic/imagemagic.functions.php');
chdir (DIR_FS_CATALOG);

 

The script will not check if includes/local/configure.php exists or not, it will simply includes includes/configure.php.

Now, all my images are displayed :)

Share this post


Link to post
Share on other sites

Thanks a lot invasi0n !!! That?s the reason my imagemagick does not display the images too !! Now everything allright !

Best Regards my friend ! :thumbsup:

Share this post


Link to post
Share on other sites

Hi,

 

I'm installing tis contribution but there is something wrong.

I don't know exactly what i must replace in 'html_output.php'

Can please someone let me know?

 

Here is my 'html_output.php':

 

<?php
/*
 $Id: html_output.php,v 1.56 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
global $request_type, $session_started, $SID;

if (!tep_not_null($page)) {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
}

if ($connection == 'NONSSL') {
  $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} elseif ($connection == 'SSL') {
  if (ENABLE_SSL == true) {
	$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
  } else {
	$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
  }
} else {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
}

if (tep_not_null($parameters)) {
  $link .= $page . '?' . tep_output_string($parameters);
  $separator = '&';
} else {
  $link .= $page;
  $separator = '?';
}

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
  if (tep_not_null($SID)) {
	$_sid = $SID;
  } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
	if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
	  $_sid = tep_session_name() . '=' . tep_session_id();
	}
  }
}

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
  while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

  $link = str_replace('?', '/', $link);
  $link = str_replace('&', '/', $link);
  $link = str_replace('=', '/', $link);

  $separator = '?';
}

if (isset($_sid)) {
  $link .= $separator . $_sid;
}

return $link;
 }

////
// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
  return false;
}

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) {
  $image .= ' title=" ' . tep_output_string($alt) . ' "';
}

if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
  if ($image_size = @getimagesize($src)) {
	if (empty($width) && tep_not_null($height)) {
	  $ratio = $height / $image_size[1];
	  $width = $image_size[0] * $ratio;
	} elseif (tep_not_null($width) && empty($height)) {
	  $ratio = $width / $image_size[0];
	  $height = $image_size[1] * $ratio;
	} elseif (empty($width) && empty($height)) {
	  $width = $image_size[0];
	  $height = $image_size[1];
	}
  } elseif (IMAGE_REQUIRED == 'false') {
	return false;
  }
}

if (tep_not_null($width) && tep_not_null($height)) {
  $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
}

if (tep_not_null($parameters)) $image .= ' ' . $parameters;

$image .= '>';

return $image;
 }

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
global $language;

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

$image_submit .= '>';

return $image_submit;
 }

////
// Output a function button in the selected language
 function tep_image_button($image, $alt = '', $parameters = '') {
global $language;

return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
 }

////
// Output a separator either through whitespace, or with an image
 function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
 }

////
// Output a form
 function tep_draw_form($name, $action, $method = 'post', $parameters = '') {
$form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"';

if (tep_not_null($parameters)) $form .= ' ' . $parameters;

$form .= '>';

return $form;
 }

////
// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {
$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
  $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
} elseif (tep_not_null($value)) {
  $field .= ' value="' . tep_output_string($value) . '"';
}

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

return $field;
 }

////
// Output a form password field
 function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') {
return tep_draw_input_field($name, $value, $parameters, 'password', false);
 }

////
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
 function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') {
$selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';

if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) {
  $selection .= ' CHECKED';
}

if (tep_not_null($parameters)) $selection .= ' ' . $parameters;

$selection .= '>';

return $selection;
 }

////
// Output a form checkbox field
 function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') {
return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters);
 }

////
// Output a form radio field
 function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {
return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters);
 }

////
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
  $field .= stripslashes($GLOBALS[$name]);
} elseif (tep_not_null($text)) {
  $field .= $text;
}

$field .= '</textarea>';

return $field;
 }

////
// Output a form hidden field
 function tep_draw_hidden_field($name, $value = '', $parameters = '') {
$field = '<input type="hidden" name="' . tep_output_string($name) . '"';

if (tep_not_null($value)) {
  $field .= ' value="' . tep_output_string($value) . '"';
} elseif (isset($GLOBALS[$name])) {
  $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
}

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

return $field;
 }

////
// Hide form elements
 function tep_hide_session_id() {
global $session_started, $SID;

if (($session_started == true) && tep_not_null($SID)) {
  return tep_draw_hidden_field(tep_session_name(), tep_session_id());
}
 }

////
// Output a form pull down menu
 function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
$field = '<select name="' . tep_output_string($name) . '"';

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

for ($i=0, $n=sizeof($values); $i<$n; $i++) {
  $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
  if ($default == $values[$i]['id']) {
	$field .= ' SELECTED';
  }

  $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
}
$field .= '</select>';

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

return $field;
 }

////
// Creates a pull-down list of countries
 function tep_get_country_list($name, $selected = '', $parameters = '') {
$countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
$countries = tep_get_countries();

for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
  $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
}

return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
 }
?>

 

Friendly greetings

Share this post


Link to post
Share on other sites

I have 2 problems, if you look here:

 

Problem 1

http://www.almatcomputers.co.uk/product_in.../products_id/19

 

My picture is showing the small size and not the new size:

 

Small Image Width 75

Small Image Height 0

Product Information Image Width 200

Product Information Image Height 0

 

I was under the impression from HTML_OUTPUT that It should not use SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT values in product_info but use PRODUCT_INFO_IMAGE_WIDTH and PRODUCT_INFO_IMAGE_HEIGHT

 

Problem 2

My header images are being processed through the imagemagic contrib and I do not want this, the rest of my settings are as follows, how can I only get Image Magic to touch the Product images and leave the rest of my images alone.

 

Full Settings:

Image Magic Master Switch On

Apply security features to registered customers Yes

Process Store's Graphics False

Auto Clean Cache True

Encrypt Image Filenames False

Filename Encryption Key online_store

Apply Internet Explorer PNG Transparency work-around? False

Use Resampling True

Create Truecolour Thumbnails True

Output GIFs as JPEGs False

'GIF as JPEG' Matte colour (HEX) FFFFFF

Cache Thumbnails on the Server True

Cache Thumbnails in user's browser True

Thumbnail Cache directory /cache

Use 404 Response if image not found? True

Allow thumbnails larger than original True

Center if thumbnail larger than original False

JPEG Quality - Pop-up Images 100

JPEG Quality - Product Information Thumbnails 80

JPEG Quality - Category Thumbnails 100

JPEG Quality - Heading Thumbnails 100

JPEG Quality - Small Thumbnails 80

Graphic Watermark in Pop-up Images No

Graphic Watermark in Product Information Thumbnails No

Graphic Watermark in Category Thumbnails No

Graphic Watermark in Heading Thumbnails No

Graphic Watermark in Small Thumbnails No

Watermark Image File

Image Watermark Transparency 20

Image Watermark Position Top

Image Watermark Margin 0

Resize Watermark Image True

Text Watermark in Pop-up Images No

Text Watermark in Product Information Thumbnails No

Text Watermark in Category Thumbnails No

Text Watermark in Heading Thumbnails No

Text Watermark in Small Thumbnails No

Watermark Text Sample

Text Watermark Font Name arial.ttf

Text Watermark Size 10

Text Watermark Colour (HEX) 000000

Text Watermark Transparency 20

Text Watermark Position Top

Text Watermark Margin 0

Text Watermark Angle 0

Auto Adjust Brightness 0

Auto Adjust Contrast 0

Frame Pop-up Images No

Frame Product Information Thumbnails No

Frame Category Thumbnails No

Frame Heading Thumbnails No

Frame Small Thumbnails No

Frame Width 4

Frame Depth 4

Frame Colour (HEX) CCCCCC

Frame Inside 3D Highlight Colour (HEX) FFFFFF

Frame Inside 3D Shadow Colour (HEX) 000000

Buttonize Pop-up Images No

Buttonize Product Information Thumbnails No

Buttonize Category Thumbnails No

Buttonize Heading Thumbnails No

Buttonize Small Thumbnails No

Button Height 4

Button Highlight Colour (HEX) CCCCCC

Button Shadow Colour (HEX) 000000


Stuart

Share this post


Link to post
Share on other sites
Hi,

 

I'm installing tis contribution but there is something wrong.

I don't know exactly what i must replace in 'html_output.php'

I think is between line 74 and 113.

Try to replace this:

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
  return false;
}

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) {
  $image .= ' title=" ' . tep_output_string($alt) . ' "';
}

if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
  if ($image_size = @getimagesize($src)) {
	if (empty($width) && tep_not_null($height)) {
	  $ratio = $height / $image_size[1];
	  $width = $image_size[0] * $ratio;
	} elseif (tep_not_null($width) && empty($height)) {
	  $ratio = $width / $image_size[0];
	  $height = $image_size[1] * $ratio;
	} elseif (empty($width) && empty($height)) {
	  $width = $image_size[0];
	  $height = $image_size[1];
	}
  } elseif (IMAGE_REQUIRED == 'false') {
	return false;
  }
}

if (tep_not_null($width) && tep_not_null($height)) {
  $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
}

if (tep_not_null($parameters)) $image .= ' ' . $parameters;

$image .= '>';

return $image;
 }

Share this post


Link to post
Share on other sites

READ THIS!

--------------

 

If you cant see the thumbnails go to admin panel and take "cache thumbnails in the server" off. If you now see the thubmnails do next:

 

Create catalog/thumbnails/images directory to your server if there isnt't.

 

I cant understand why this wasnt in the readme.

Share this post


Link to post
Share on other sites

Ref my post 785 I have narrowed the problem down.

 

The code here is causing problems

 

   if (isset($product_info['products_image']) 
&& $src == DIR_WS_IMAGES . $product_info['products_image']
&& $product_info[products_id]==$_GET['products_id'])  { // final check just to make sure that we don't interfere with other contribs
$width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH;
$height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT;
$product_info_image=true;
$page="prod_info"; 
 }
}

 

If I change it to

 

   if (isset($product_info['products_image']) 
&& $src == DIR_WS_IMAGES . $product_info['products_image']
)  { // final check just to make sure that we don't interfere with other contribs
$width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH;
$height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT;
$product_info_image=true;
$page="prod_info"; 
 }
}

 

i.e remove

 

&& $product_info[products_id]==$_GET['products_id']

 

It works, why is this causing a problem, the only downside of removing this code in on products_info all other infoboxes shows the medium size. Has the new update changed the get command.

 

Here is my product_info.php form command

 

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>

Edited by stu2000

Stuart

Share this post


Link to post
Share on other sites

Forgive me if this has already been answered, but I tried my best to work through 40 pages of thread!

 

First things first, this is a superb contribution - the difference in the quality of the images is unbelievable.

 

I'm getting a lot of images that aren't showing up and they're all GIFs, no surprise there. I've checked my server and it have GD version "2.0 or higher" - I was under the impression that this could handle GIFs. server_info even says that GIF read and create suppport is enabled, but I just get blank white squares.

 

Am I just going to have to grit my teeth and replace all the GIFs with JPGs? It's just there are 229 of 'em... :'(

 

Or is there something obvious I'm missing?

Share this post


Link to post
Share on other sites
Did you try to set "Output Gifs as Jpgs" to TRUE (It is false by default) in the admin area?

 

 

Oh yes, it's definitely set to TRUE.

Share this post


Link to post
Share on other sites

@ invasion: Thanks! it's installed now.

 

But it doesn't work good.

If i set the image magic 'on', my images of the products are gone.

I think that he can't find them, is there someting wrong with my sources?

I can't find the problem. Anyone had the same problem?

 

Friendly greetings

Edited by bougie

Share this post


Link to post
Share on other sites

Just realised that all my product thumbnails in the admin area are only about 1px wide. How can I get them ot display properly?

(Could not see the answer on here)

Share this post


Link to post
Share on other sites
i had the same issue...

the thumbnails is generated, but doesn't show :( even if i turn off the cache, doesnt show.. the only way i get working the images is when i turn off the entire imagemagic

 

http://www.rigam.cl/catalogo/imagemagic.ph...;page=prod_info

http://www.rigam.cl/catalogo/thumbnail/ima...99dc2ca0faa.jpg

 

what can i do?

 

 

Yeah, after an big (week) exploration on da forum i found da solution, for ALL people who follow strictly installation instructions, such people like me who had thumbnails generated, but no thumbnails images showing up on client side, just do that:

 

go to your php configuration (php.ini) and turn the setting "display_errors" to "Off" and restart da server. Images now all would show up.

 

peace to people :thumbsup:

Share this post


Link to post
Share on other sites
READ THIS!

--------------

 

If you cant see the thumbnails go to admin panel and take "cache thumbnails in the server" off. If you now see the thubmnails do next:

 

Create catalog/thumbnails/images directory to your server if there isnt't.

 

I cant understand why this wasnt in the readme.

 

I tired this, but my thumbnails are still only 1 px wide in the admin area. Any ideas?

 

Pleaseeeee.

Share this post


Link to post
Share on other sites
@ invasion: Thanks! it's installed now.

 

But it doesn't work good.

If i set the image magic 'on', my images of the products are gone.

I think that he can't find them, is there someting wrong with my sources?

I can't find the problem. Anyone had the same problem?

 

Friendly greetings

Have you created the thumbnails folder? It has the right permissions (777)?

Share this post


Link to post
Share on other sites
Have you created the thumbnails folder? It has the right permissions (777)?

 

Hi,

 

I've created a new folder: /catalog/thumbnails and made the permissions 777

It doesn't work :( but thanks.

 

Here is the configuration of my image magic in the admin:

 

Help support the OSC Image Magic Project Make a donation   
Image Magic Master Switch Off   
Apply security features to registered customers Yes   
Process Store's Graphics False   
Auto Clean Cache True   
Encrypt Image Filenames False   
Filename Encryption Key changeme   
Apply Internet Explorer PNG Transparency work-around? False   
Use Resampling True   
Create Truecolour Thumbnails True   
Output GIFs as JPEGs False   
'GIF as JPEG' Matte colour (HEX) FFFFFF   
Cache Thumbnails on the Server True   
Cache Thumbnails in user's browser True   
Thumbnail Cache directory /thumbnails   
Use 404 Response if image not found? True   
Allow thumbnails larger than original True   
Center if thumbnail larger than original False   
JPEG Quality - Pop-up Images 100   
JPEG Quality - Product Information Thumbnails 100   
JPEG Quality - Category Thumbnails 100   
JPEG Quality - Heading Thumbnails 100   
JPEG Quality - Small Thumbnails 100   
Graphic Watermark in Pop-up Images No   
Graphic Watermark in Product Information Thumbnails No   
Graphic Watermark in Category Thumbnails No   
Graphic Watermark in Heading Thumbnails No   
Graphic Watermark in Small Thumbnails No   
Watermark Image File	
Image Watermark Transparency 20   
Image Watermark Position Top   
Image Watermark Margin 0   
Resize Watermark Image True   
Text Watermark in Pop-up Images No   
Text Watermark in Product Information Thumbnails No   
Text Watermark in Category Thumbnails No   
Text Watermark in Heading Thumbnails No   
Text Watermark in Small Thumbnails No   
Watermark Text Sample   
Text Watermark Font Name arial.ttf   
Text Watermark Size 10   
Text Watermark Colour (HEX) 000000   
Text Watermark Transparency 20   
Text Watermark Position Top   
Text Watermark Margin 0   
Text Watermark Angle 0   
Auto Adjust Brightness 0   
Auto Adjust Contrast 0   
Frame Pop-up Images No   
Frame Product Information Thumbnails No   
Frame Category Thumbnails No   
Frame Heading Thumbnails No   
Frame Small Thumbnails No   
Frame Width 4   
Frame Depth 4   
Frame Colour (HEX) CCCCCC   
Frame Inside 3D Highlight Colour (HEX) FFFFFF   
Frame Inside 3D Shadow Colour (HEX) 000000   
Buttonize Pop-up Images No   
Buttonize Product Information Thumbnails No   
Buttonize Category Thumbnails No   
Buttonize Heading Thumbnails No   
Buttonize Small Thumbnails No   
Button Height 4   
Button Highlight Colour (HEX) CCCCCC   
Button Shadow Colour (HEX) 000000

 

Do you know what's maybe wrong, i've tried difrent steps.

 

Friendly greetings

Edited by bougie

Share this post


Link to post
Share on other sites
Hi,

 

I've created a new folder: /catalog/thumbnails and made the permissions 777

It doesn't work :( but thanks.

 

did you create also "thumbnails/images/"? I mean also images directory after thumbnails? and does the pictures come in there?

Share this post


Link to post
Share on other sites
did you create also "thumbnails/images/"? I mean also images directory after thumbnails? and does the pictures come in there?

 

Hi,

 

I've created "thumbnails/images/" but how shoud the pictures get there?

It's because there are some already automatictly in that folder but not al the pictures.

And i still can't see them in my shop.

 

Friendly greetings

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
Sign in to follow this  

×