Hey, quick question, how hard would it be to modify the amazing imgsizer plugin to add whitespace on all 4 sides of an image before it scales it down?
I realize this might be a silly question but for one of our websites, our client will be uploading images for products that are already on a white background, however I want there to be a little more whitespace added to the images so that they look nicer instead of possibly getting parts of the product in the image cut off because they may have very little whitespace in the image to start with.
I will be using it with equal width and height parameters so that the image will be scaled from the center out.
Any hints / tips on modifying this to add the requested functionality would be greatly appreciated. It may not even be possible, I just thought I would ask.
cheers
Just a quick thought on this one but could you not just use some CSS to add in the extra white colour around the images? This way then if ever you want to change the colour you can do this with a CSS rule instead of having to change all the images. Perhaps then you could get the images uploaded without any white-space around them and do it all with CSS.
Would be easier I think.
Sorry but regarding the plugin and modifying it I’m not really sure how you would do that but if you do still need that functionality then perhaps a quick e-mail to Lumis might get you an answer.
Best wishes,
Mark
I ditto Mark’s suggestion.. Unless you really need the images to have the white burned into the image, give your product images a class of product shot, say (e.g. < img src=”photo.jpg” class=”productshot” / > )
Then in your CSS
img.productshot {background:#ffffff;padding:5px;}
Hope that helps,
Paul
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.