LemonStand Forum: White area at side of image thumbnails - LemonStand Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

White area at side of image thumbnails

#1 User is offline   fullphat 

  • Member
  • Group: Members
  • Posts: 17
  • Joined: 17-January 12

Posted 24 January 2012 - 08:20 AM

Hi Guys,

When I add a thumbnail to product when viewing this in the category it seems to add white space down the sides if the images proportions don't fill the space, how can i specify what colour this is? Its currently white but the sites background is black so it sticks out a mile on every product because they are all portrait and not square.

Many thanks in advance,

Martin
0

#2 User is offline   dardub 

  • Lemonholic
  • PipPipPip
  • Group: Members
  • Posts: 483
  • Joined: 30-August 10

Posted 25 January 2012 - 10:36 AM

Hi I think if you use Imagemagick and this module, you should be able to change the background color.


-Darren
0

#3 User is offline   fullphat 

  • Member
  • Group: Members
  • Posts: 17
  • Joined: 17-January 12

Posted 26 January 2012 - 02:24 AM

Thanks Darren,

Ill give it a whirl and report back, just for reference it cant be done without Imagemagick.

Cheers
Martin
0

#4 User is offline   fullphat 

  • Member
  • Group: Members
  • Posts: 17
  • Joined: 17-January 12

Posted 31 January 2012 - 03:29 AM

After setting the config to the following:

$CONFIG['IMAGEMAGICK_ENABLED'] = true;
$CONFIG['IMAGEMAGICK_PATH'] = '/usr/bin/convert';
$CONFIG['IMAGE_JPEG_QUALITY'] = 85;

I'm always getting the error creating thumbnail every time i upload, any ideas why this is? Ive tried it with the Imagemagick module installed and disabled but I'm still getting this.

Imagemagick is installed and showing in my phpinfo so Im a bit lost as to why this wont work.
0

#5 User is offline   Eric 

  • Developer
  • PipPipPip
  • Group: Members
  • Posts: 1,290
  • Joined: 04-August 10
  • LocationVancouver, Canada

Posted 31 January 2012 - 11:26 AM

View Postfullphat, on 31 January 2012 - 03:29 AM, said:

After setting the config to the following:

$CONFIG['IMAGEMAGICK_ENABLED'] = true;
$CONFIG['IMAGEMAGICK_PATH'] = '/usr/bin/convert';
$CONFIG['IMAGE_JPEG_QUALITY'] = 85;

I'm always getting the error creating thumbnail every time i upload, any ideas why this is? Ive tried it with the Imagemagick module installed and disabled but I'm still getting this.

Imagemagick is installed and showing in my phpinfo so Im a bit lost as to why this wont work.


IMAGEMAGICK_PATH should not include the ending /convert part. It should be where convert is located. Thus: /usr/bin
0

#6 User is offline   fullphat 

  • Member
  • Group: Members
  • Posts: 17
  • Joined: 17-January 12

Posted 01 February 2012 - 03:49 PM

Turns out exec AND shell_exec were disabled in our php.ini which is required to make this work, our server people say these commands are disabled for security reasons, has any one had any problems when enabling these, I really don't want to do this if its likely to effect the sites on our server.

Its either enable or don't us Lemonstand at this stage from the feedback we've had
0

#7 User is offline   fullphat 

  • Member
  • Group: Members
  • Posts: 17
  • Joined: 17-January 12

Posted 02 February 2012 - 02:32 AM

Just in case anyone else comes across this problem again you wouldnt necessarily have to have Imagemagick installed to change the colours of the bars down either side. To change this colour you can do the following:

1: Open Up the file /phproad/modules/phpr/helpers/phpr_image.php

2: Go to line 116

3: Find this : imagecolorallocate($image_p, 255, 255, 255);

4: The RGB here controls the background colour, our site had a very dark background so the default white stuck out a mile, simply change this to what you want and all images from this point will have the coloured background selected.


Saves having to make your client save everything as png's if they dont have the time / knowledge to do this :)

Cheers
Martin + Andrew
Full Phat Design
0

#8 User is offline   Jartisan 

  • Member
  • Group: Members
  • Posts: 8
  • Joined: 30-November 11

Posted 08 March 2012 - 07:49 PM

View Postfullphat, on 02 February 2012 - 02:32 AM, said:

Just in case anyone else comes across this problem again you wouldnt necessarily have to have Imagemagick installed to change the colours of the bars down either side. To change this colour you can do the following:

1: Open Up the file /phproad/modules/phpr/helpers/phpr_image.php

2: Go to line 116

3: Find this : imagecolorallocate($image_p, 255, 255, 255);

4: The RGB here controls the background colour, our site had a very dark background so the default white stuck out a mile, simply change this to what you want and all images from this point will have the coloured background selected.


Saves having to make your client save everything as png's if they dont have the time / knowledge to do this :)

Cheers
Martin + Andrew
Full Phat Design


Is there a way to regen the thumbnails? - I made the change, but existing images are all still white bordered.
0

#9 User is offline   dardub 

  • Lemonholic
  • PipPipPip
  • Group: Members
  • Posts: 483
  • Joined: 30-August 10

Posted 09 March 2012 - 09:36 AM

View PostJartisan, on 08 March 2012 - 07:49 PM, said:

Is there a way to regen the thumbnails? - I made the change, but existing images are all still white bordered.


You can delete all the old thumbnails and it will create new one's.

They are located under. /uploaded/thumbnails
0

#10 User is online   Cerulean 

  • Member
  • Group: Members
  • Posts: 18
  • Joined: 22-February 12

Posted 20 May 2012 - 06:37 PM

Just thought I'd add that it's very easy to use the LemonStand image functions together with third-party image resizing scripts like SLIR, TimThumb or phpThumb.

Then you can easily crop images, sharpen, set JPG quality and so on. I like SLIR because it's simple and the URLs are nicer, but if you want coloured backgrounds and other fancyness then phpThumb is the more powerful option.
0

Share this topic:


Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users