Support Forum

  • Page:
  • 1
  • 2

Image resizing

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

I am setting up Captify Content but my images do not show the entire height. The top & bottom is cut off. How can I fix that? The width shows fine.

Lisa
  • lchestnut's Avatar
  • lchestnut
  • Free Extensions
  • 52 posts
  • Karma: 0
The administrator has disabled public write access.
Are you cropping the images int he module admin eg do you have a ratio set for the height and width?

To resize without cropping the images you need to make sure that the dimensions of the resized image are the same as the original eg 300 wide 400 high is the same dimension as 900 high by 1200 wide. And that the crop ratio is set to 1:1 in the module admin.

Hope that helps.

Thanks Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
I don't want to crop the images - there is a div class="caption-wrapper" here can i find that the img src have a height...

I want to display the dimension of the Image, in the Parameter Settings of the Backend...

Tell me how can i put the CropRatio to off...

Please help - Sorry my English is very bad!
  • OrangeCocoon's Avatar
  • OrangeCocoon
  • LIfetime Developer - Big Bamboo
  • 8 posts
  • Karma: 0
Last Edit: 10 years 2 months ago by OrangeCocoon.
The administrator has disabled public write access.
Hi Kerstin,

The same as what I wrote above ..

eg make sure the thumb image is the same dimension as the original and set the ratio to 1:1

Thanks Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Thanx for your fast answer! :cheer:

The thumbs are the same dimensions!

They are all 240px x 193px, but one of it is 257px x 193px... Crop Ratio is 1 to 1 and it makes 257px x 181px!

I can edit the Picture in Fireworks but thist Website ist not for me...

I will say the User can't cut the Images by himself...so I don't want the Crop funktion and I don't find it in the SourceCode - where i can comment it out...

I hope you understand me - it is very delicate for me to define it in english.... ;)

Here the link - this Page is only testet in Firefox yet.

neu.batalpha.com/index.php?option=com_content&view=category&layout=blog&id=1&Itemid=2
  • OrangeCocoon's Avatar
  • OrangeCocoon
  • LIfetime Developer - Big Bamboo
  • 8 posts
  • Karma: 0
Last Edit: 10 years 2 months ago by OrangeCocoon.
The administrator has disabled public write access.
Hey Kerstin,

We can alter the module code to remove the cropping entirely but I doubt it will be a good solution if your client is going to be adding pictures without resizing.
As an example, you have 4 images displaying in the module and the combined width is that of the module position. If you add images of different sizes and the total width exceeds the width of that module position, you will find that the fourth image will move to the next line breaking the layout.
Let us know your thoughts.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Dear Jason,

i know the reason waht you mean if we alter the code... at one Part i have alter the code and modified it in templates/batalpha/html/mod_captifyContent/default.php

Here I have alter this:

<div id="captifyContent">
<?php if (!($sectionImage == "")) : ?>
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id,$sectionid)); ?>" class="Products">
<img src="<?php echo $url ?>modules/mod_captifyContent/image.php?width=<?php echo $image_width ?>&<?php echo $image_height ?>&cropratio=<?php echo $crop_width ?>:<?php echo $crop_height ?>&image=<?php echo JURI::root( true ) ?>/images/stories/<?php echo $item->image;?>" class="captify" alt="<?php echo $item->title;?>" />
<?php echo ($params->get( 'sectionid', 1 )==2)?"<span>".$item->title."</span>":""; ?>
</a>
<?php endif; ?>
</div>
</div>
<?php endforeach; ?>
<?php }

You can see it here: neu.batalpha.com/index.php?option=com_content&view=category&layout=blog&id=8&Itemid=3

So back to my problem:

is it possible to give the width and height for the images in the parameter settings?

I mean if the client makes all new pictures width a height from 193px, the parametersettings has a width from 240px, so the width is ever 240px and the height 193px???

:blush:

Thanx Kerstin
  • OrangeCocoon's Avatar
  • OrangeCocoon
  • LIfetime Developer - Big Bamboo
  • 8 posts
  • Karma: 0
Last Edit: 10 years 2 months ago by OrangeCocoon.
The administrator has disabled public write access.
Hi there,

The issue actually isnt to do with the crop as far as I can see. If you have it set to 1:1 thats the equivalent of removing it.

I think the issue is that the shorter image actually isnt large enough.


If you compare the original images:

neu.batalpha.com/images/stories/projekte/teatro_maestranza/teatro_maestranza.jpg

240px by 193px


and


neu.batalpha.com/images/stories/projekte/musiktheater_im_revier/musiktheater_im_revier.jpg

257 by 193



But the resized images are

240 by 181

and

240 by 193 respectively.


So the first image is actually being resized down to the width specified in the module. The way around this is to change the dimensions of the image or at least to make sure that the original image is at least 253px wide. That should render the same results for the shorter image.

Hope that is easy enough to understand :)

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Thanx Anthony for your help, but the original pictures are not the same width and height, so I call my client that he must resized the images in 193px height or 240px width!

When 193px height - it can be 257px weight

Or when 240px weight - it can be 210px height

You know what i mean?

I can modified the image in Fireworks or Photosho and cut them, so they are all 193 height and 240 width...

I had think that there is a solution for the Images that they are all 240px width and 193px height - whatever minimal differnece the Pictures are...

So if there is no other chance width the Crop Ratio I modified the Image and Call thist to my Client.

Thanx for your help - and thanx for this very nice module ;-)

very best regards Kerstin
  • OrangeCocoon's Avatar
  • OrangeCocoon
  • LIfetime Developer - Big Bamboo
  • 8 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Kerstin,

Its not that they need to be the same width and height its just that the original image has to be larger expecially to cater for the different dimensions. If you made the original image 400px wide I think that would solve it for you.

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Hey - I've solved the prob - I gave alle the pix the width 240px and height 193px - so it works!

Now my Client want to Show 16 Pictures - so I go to the Parameters an i give the Image width 120 and 96.5 height and the ratio 1 to 1!

But now all Pix are black!?

Don't you know?

regards Kerstin
  • OrangeCocoon's Avatar
  • OrangeCocoon
  • LIfetime Developer - Big Bamboo
  • 8 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Kerstin,

Everything looks fine to me now. I see all images, none of them black, so I assume you have it fixed now. Right?
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.
Hi Seth,

no all are black (Mac Firefox 3.6)!!!

Here the link again: neu.batalpha.com/index.php?option=com_content&view=category&layout=blog&id=1&Itemid=2&lang=de


:unsure:

Safari the same - all images are black...
  • OrangeCocoon's Avatar
  • OrangeCocoon
  • LIfetime Developer - Big Bamboo
  • 8 posts
  • Karma: 0
Last Edit: 10 years 1 month ago by OrangeCocoon.
The administrator has disabled public write access.
Yeah, now I see. It is the same here.

Try deleting the contents of the folder in modules/mod_captifyContent/imagecache

That will force the imagescript to recreate the thumbnail images.
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.
Hi,

I'm having a similar problem, but using mod_minimoo2...

All (!) my pictures are in the original size of 800x600 px. Thumbnails are set to size of 115x115 px and 2:1 ratio for cropping. The preview image has the resize of 400x300px, that's still the same ratio. Cropping is set to 1:1 here. Nevertheless the picture is a square in the size of 300x300 px (?!). The resize width of 400 px is not taken into account. I tried also vice versa and set the resize to 300x400, but the square was just bigger 400x400.

What am I doing wrong? I just want the preview image in the size of 400x300 px without cropping.

The big picture in the pretty-photo is fine, still 800x600 px :-)

Thanks
Paul
  • chapuisat's Avatar
  • chapuisat
  • Previous Member
  • 8 posts
  • Karma: 0
The administrator has disabled public write access.
Hey Paul,

You need to specify a crop ration of 4:3 in this case.
Try that and let me know if that fixes it.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Yep, that's it! Thank al lot!
My assumption was; 1:1 means original size...

OK, works fine! great tool!

Paul
  • chapuisat's Avatar
  • chapuisat
  • Previous Member
  • 8 posts
  • Karma: 0
The administrator has disabled public write access.
Hey Paul,

Yeah thats a good assumption really but the script doesnt function like that. I guess you have the feel for it now though.

Cheers Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Hi Seth,

deleting the imagecache - not fix the problem!

It's all the same....

It will not work - I set the ration to 0.5 and 0.5, deleting the imagecache - reload - all the same

I set the ratio to 1 to 1 - deleting - reload - the same

It will allways work, when I set the height and width to the original ImageSize but......

Any other Ideas?

:(
  • OrangeCocoon's Avatar
  • OrangeCocoon
  • LIfetime Developer - Big Bamboo
  • 8 posts
  • Karma: 0
Last Edit: 10 years 1 month ago by OrangeCocoon.
The administrator has disabled public write access.
Hey Kerstin,

I suspect that this might be an issue with gd library on your server. If you could log us a support ticket with some ftp details, I wouldn't mind investigating this one for you.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers