Shopping Basket

 x 
Cart empty


Popular Items

Find Us Elsewhere

2Checkout.com is a worldwide leader in payment services
  • Page:
  • 1

TOPIC: Imgen Watermark Issues

Imgen Watermark Issues 1 year 3 months ago #529

  • GarfordJB
  • GarfordJB's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Hello,

I'm afraid I'm being a bit simple, but how do I get this plugin to work? I'm just trying to use Imgen and the Watermark plugin with the standard com_content component. I have installed both the plugin and component and enabled the plugin.

I have seen that I can use a different URL for the images within other components and modules, but do I need to do anything at all to get it to work with the core components?

Thanks for your help!

Garford JB
The administrator has disabled public write access.

Re: Imgen Watermark Issues 1 year 3 months ago #530

  • boggler
  • boggler's Avatar
  • OFFLINE
  • Moderator
  • Posts: 476
  • Thank you received: 51
  • Karma: 10
I don't think that you are being simple.

The easiest way to use it with the Joomla core content component is to use the image resizer plugin: http://www.spiralscripts.co.uk/component/option,com_jdownloads/Itemid,98/catid,4/cid,4/view,viewdownload/.

This will resize your images automatically for you. If you don't want to do it automatically you can do it by changing the image url as with other components, in your article editor. If you have an image URL:

images/myimage.jpg

then you can alter the image url to

index.php?option=com_imgen&format;=image&img;=images%2FFmyimage.jpg&layout;=jpg&width;=300&height;=300&quality;=90

if you have set the default image path and width and height options then this could be shortened to

index.php?option=com_imgen&format;=image&img;=myimage.jpg
The administrator has disabled public write access.

Re: Imgen Watermark Issues 1 year 3 months ago #531

  • GarfordJB
  • GarfordJB's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Ah! Thank you Susan,

I've now managed to get it to work, but can I get the watermark to work automatically without resizing the image?

Thanks again!

John.
The administrator has disabled public write access.

Re: Imgen Watermark Issues 1 year 3 months ago #532

  • boggler
  • boggler's Avatar
  • OFFLINE
  • Moderator
  • Posts: 476
  • Thank you received: 51
  • Karma: 10
Unfortunately that is more difficult than perhaps it should be. The Imgen component allows you to output the image without resizing by supplying a width and height of 0, but the resizer plugin assumes that you will be resizing, and doesn't allow for a width or height of zero.

You would need to edit the code for the image resizer plugin to change the default values, in the imageresizer.xml file edit:-
<field name="articleWidth" type="text" default="0" label="Article Image Width" description="IMGEN_ARTICLEWIDTH" />									
 		<field name="articleHeight" type="text" default="0" label="Article Image Height" description="IMGEN_ARTICLEHEIGHT" />

do that for all the width and height values.

and in the imageresizer.php file change all the default width and height values to zero, eg
$width = (int)$pluginParams->get('articleWidth','0');	
		     $height = (int)$pluginParams->get('articleHeight','0');	
Last Edit: 1 year 3 months ago by boggler.
The administrator has disabled public write access.

Re: Imgen Watermark Issues 1 year 3 months ago #533

  • GarfordJB
  • GarfordJB's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Thank you Susan.

That was exactly what I had done to get around the problem. Works very well! Thank you!

Oh, one last thing, is it possible to change the resize dimensions depending upon whether the photo is landscape or portrait?

Thank you!

John.
The administrator has disabled public write access.

Re: Imgen Watermark Issues 1 year 3 months ago #534

  • boggler
  • boggler's Avatar
  • OFFLINE
  • Moderator
  • Posts: 476
  • Thank you received: 51
  • Karma: 10
Not at the moment, it is something to think about for the future. A lot of people seem to go with square thumbnails to get around this problem. The component should centre images that are cropped, so usually the results are OK.
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: boggler
Time to create page: 0.381 seconds