Different image sizes -> blurr

  • Posts: 39
  • Thank you received: 0
12 years 10 months ago #15439

hello,

I wanted to change the size of the product page.
Here my settings:

config->files-> width: 130 height 113

.hikashop_product_main_image_thumb img{

width: auto!Important;
height: 153px!Important;

}

.hikashop_product_image img {

width: auto!Important;
height: 110px!Important;

}




I've tried to give the images a height and an automatic width, so that there is no blurr anymore.
I thought that when I change in config.->files: width: , height: 113 it would give it a no-blurry image.
This works, the image is shown clear, but there is a big warning:



Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /homepages/44/d209303546/htdocs/mysite/Joomla/administrator/components/com_hikashop/helpers/image.php on line 281

Warning: imageantialias(): supplied argument is not a valid Image resource in /homepages/44/d209303546/htdocs/mysite/Joomla/administrator/components/com_hikashop/helpers/image.php on line 297

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /homepages/44/d209303546/htdocs/mysite/Joomla/administrator/components/com_hikashop/helpers/image.php on line 300

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /homepages/44/d209303546/htdocs/mysite/Joomla/administrator/components/com_hikashop/helpers/image.php on line 281

Warning: imageantialias(): supplied argument is not a valid Image resource in /homepages/44/d209303546/htdocs/mysite/Joomla/administrator/components/com_hikashop/helpers/image.php on line 297

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /homepages/44/d209303546/htdocs/mysite/Joomla/administrator/components/com_hikashop/helpers/image.php on line 300


How can I get a clear image with no blurr?

Regards,

Storm =)

Last edit: 12 years 10 months ago by Storm15.

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
12 years 10 months ago #15441

Hi,

These errors means that you probably have misconfigured the settings of the files tab of the configuration. Could you do a screenshot ?

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 0
12 years 10 months ago #15450

The problem is that I gave it no width. I thought that this gives it an auto width.
When I set 130px as width, the warning disappears, but the blurr appears then.

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
12 years 10 months ago #15465

I you set a width and not a height, the system won't be able to calculate a proper size for your images and will display these warnings.

If your thumbnails are blurred after you changed your thumbnails size, you need to go to the folder media/com_hikashop/upload/thumbnails via FTP and delete all the files. HikaShop will then automatically recreate the thumbnails.

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 0
12 years 10 months ago #15474

It's still blurry...

btw the picture itself isn't blurry

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
12 years 10 months ago #15485

So it's it's not the picture, what is the problem ? I'm not following you...

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 0
12 years 10 months ago #15487

I mean the picture as a file (good quality).
The thumb on the product page is blurry, when I give in config->files->width: "(nothing)" and height: 113, the thumb isn't blurry anymore, but there is the warning. It would be perfect without the warning.

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
12 years 10 months ago #15489

You can add the code:
if(!$thumbnail_x || !$thumbnail_y){ return true; }
in the file administrator/components/com_hikashop/helpers/image.php before the line:
$new = $this->scaleImage($this->width, $this->height,$thumbnail_x,$thumbnail_y);

We're going to add that modification on our end as well for next version since we don't want to resize the thumbnails when one of the two values is not set.

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 0
12 years 10 months ago #15531

When I add the code and one of the values isn't set , the warning even appears in the productlisting thumb.
It doesn't fix my problem.

Regards,

Storm

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
12 years 10 months ago #15542

Are you sure that you added the code at the good place ? It should be in the function generateThumbnail of that file.
Could you also check that you don't have any space or other character in one of your thumbnails size fields of the configuration?

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 0
12 years 10 months ago #15550

The php file is attached. I've put the code before the line you have mentioned. But what does the code exactly?
In config->files I've only set height to 113, in width is nothing written.

In the frontpage, the products name is displayed twice now. One on top and one below the first name.
The image on the product page is displayed wrong (1x5px).

File Attachment:

File Name: image-20110502.txt
File Size:14 KB

Attachments:
Last edit: 12 years 10 months ago by Storm15.

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
12 years 10 months ago #15561

Could you give us an FTP access and a link to your website so that we can check out the problem because it's hard to try to fix the problem when when don't have any error messages on our tests... You can send the information via our contact form.

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
12 years 10 months ago #15666

Hi,

We looked at the problem and made some additional modifications to the code which we will include in next release.
We made our tests on the product:
Siemens 6ES5948-3UR23
which now has two additional images with their thumbnails generated automatically with only the height parameter present.

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 0
12 years 10 months ago #15830

Hello and thank you so much for the great support.
Here is the way it works:

Hikashop->config.->files-> height: (the size you want on the product page), width: nothing

Now the images on the product listing are too big, so we give them a height and autom. width:

.hikashop_product_image img {

height: 108px!Important;
width: auto!Important;

}

.hikashop_product_image  {            //because of a margin caused of the height set in files

height: 108px!Important;
width: auto!Important;


}


Regards,

Storm =)

Last edit: 12 years 10 months ago by Storm15.

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 4
  • Hikashop Business
12 years 10 months ago #17131

Just what I was looking for, thanks so much!

I also added some code to for the category listings also:

.hikashop_category_image img {

height: 108px!Important;
width: auto!Important;

}

.hikashop_category_image { //because of a margin caused of the height set in files

height: 108px!Important;
width: auto!Important;


}

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum