Elxis CMS Forum

Extensions => Components => Topic started by: rulez22 on September 16, 2010, 00:46:06

Title: IOSR images processing feature request
Post by: rulez22 on September 16, 2010, 00:46:06
Not sure if this is related to Elxis or IOSReservations part but here is something in my opinion not very good in this system.
Maybe you can read it as a feature request.. It is regarding images in the system and the way they processed. I understand this is all Open Source and done volunterely, but..

Things are bothering me:
1. square images 75x75px by default are too small, can only resize them with CSS as I was told, but it will only be CSS scaling and quality will be bad.
2. once images processed after uploading they are "dead" (originals lost?), for example in Drupal CMS originals are kept and there is no need to REupload all the images after changing size setting in the system. Only change settings, there you can make like presets for images to show and they get reprocessed from originals.
3. Original full-size images kept as is, there is no fool-proof system for limiting the size. 75x75 thumbnail is too small and when you click to get full image you can get huge 3-5meg file (in case lets say you have site managers which can only update images or some limited content and lets say they stupidly upload huge raw photos from a camera). Wouldnt it be nice to have limit for the full size image as well (like 800x800px or 600x600px or whatever..)?
4. Watermarking (this could be done with Gallery component I was told.)

Thanks

Title: Re: IOSR images processing feature request
Post by: datahell on September 16, 2010, 08:19:37
1. You can set the thumbnail size to anything you wish. 75X75 is the default one, change it to something bigger if you wish.
2. The uploaded images are not lost. They become the full-width images. It is very bad method to resize the images on-the-fly each time someone wants to see them as you push the server's CPU to its limits. The most wise solution is to resize them at the wanted size at the time you upload them.
3. It is easy to add an automatic re-size. If this is your problem it can be done.
4. Watermark can also be easily added.

I believe that you worry too much. You could re-size your images before upload to the desired width X height.
Title: Re: IOSR images processing feature request
Post by: rulez22 on September 16, 2010, 14:31:07
1. You can set the thumbnail size to anything you wish. 75X75 is the default one, change it to something bigger if you wish.
2. The uploaded images are not lost. They become the full-width images. It is very bad method to resize the images on-the-fly each time someone wants to see them as you push the server's CPU to its limits. The most wise solution is to resize them at the wanted size at the time you upload them.
3. It is easy to add an automatic re-size. If this is your problem it can be done.
4. Watermark can also be easily added.

I believe that you worry too much. You could re-size your images before upload to the desired width X height.

1. Thanks
2. On-the-fly is a bad method i know, it is not what I said, in Drupal they get resized and cached only once (i'm not promoting Drupal here by the way ;) Drupal has many bad issues, but it is good in this field, can do presets and also watermarking and even things like grayscaling, etc all can be done), so they do not get resized every time user opens a page. For example lets say I have worked on a IOSR website and uploaded 100 of hotels with images, it will take ages to reupload pictures again once it done. In Exlis once it's uploaded it will be resized to whatever size once. As you said uploaded files become Full-width images, but if lets say hotel owners or our managers who are adding hotels not smart - there is no way to stop them uploading huge files like 2000x3000px.
3. That will be a great feature!
4. You suggest using programms like Photoshop for this? Not very useful if you have to process 100s of images.

Many thanks for your quick response!
Title: Re: IOSR images processing feature request
Post by: datahell on September 16, 2010, 14:37:57
Elxis has image re-size and watermark long before drupal... Have you checked the media manager?
You can use an image viewer such as irfanview (free) that supports (among others) bulk images resizing. It will resize hundreds of images within some seconds.
Title: Re: IOSR images processing feature request
Post by: rulez22 on September 30, 2010, 16:05:09
I've made picture size bigger in settings, about 160px
It works for hotels, but not for flickr Area images, these are still 75x75
I think it is hard coded.
Strangely "Area Photos" - first picture is clear (the one uploaded via "Locations"), the rest pulled from Flickr all scaled and blurred.
Title: Re: IOSR images processing feature request
Post by: datahell on September 30, 2010, 17:36:29
This is on how you administer your site and how much you pay attention to details/settings.
Go to the demo site, to any hotel you wish. To this one for example:
http://hotels.isopensource2.com/reservations/mykonos/pelekanos-hotel.html (http://hotels.isopensource2.com/reservations/mykonos/pelekanos-hotel.html)
Are the pictures blurred/distorted? No, because IOS Reservations CROPS the thumbnails in order not to be distorted. This is done especially in order to have the best possible thumbnails quality without distortions. Compare CAREFULLY the thumbnail and the original large image and you will see by yourself what it does.

Now, if the thumbnail quality is not good enough for you, you can raise the quality level in the thumbnails generation function from 80 to a higher number (even 100). See $resmaster->resizeimg() for more.

Something else: ALWAYS upload/use jpeg images for pictures.
Title: Re: IOSR images processing feature request
Post by: rulez22 on September 30, 2010, 18:21:18
yes, I always use jpeg only
What I meant was - if you look at your example link
http://hotels.isopensource2.com/reservations/mykonos/pelekanos-hotel.html
In your case it is 75x75
In my case it is 160
And what happens is - hotels pictures are fine, they all 160x160
But the next part "Area photos" shows:
1st image from what you have in "Location" (160x160) which is fine (in your case it is http://hotels.isopensource2.com/components/com_reservations/gallery/destinations/thumbs/mykonos.jpg)

BUT all others (all flickr images) are 75x75 scaled (not resized) to 160x160!
Title: Re: IOSR images processing feature request
Post by: datahell on September 30, 2010, 19:28:53
There is no PHP resize on the flickr images as they are on a remote location (flickr.com) and for security reasons you can not open a remote file via PHP for editing. Flickr generates its thumbnails at 75x75 pixels.
Check this sample to see it by your self:
http://farm3.static.flickr.com/2606/3826190117_e8e75b0565_s.jpg (http://farm3.static.flickr.com/2606/3826190117_e8e75b0565_s.jpg)
Most sites use 75 or 80 pixels width for their thumbnails. That's why IOSR has this setting at 75px by default.

IOSR applies via html a resize on them based on your settings but as the resize is via HTML you lose quality if you enlarge it too much, like in your case from 75px to 160px.

I provide you 2 solutions:
1. Upload the images by your self and dont use directly the flickr images.
2. Use the flickr large image instead of the thumbnail. This has the disadvantage that the page will load slowly especially if you use too many images from flickr. To do so open:
components/com_reservations/includes/extend.html.php
go to line 600 and change this:
echo '<img src="'.$thumb['small'].'" alt="'.$thumb['title'].'" title="'.$thumb['title'].'" border="0"'.$wh.' />';
to this:
echo '<img src="'.$thumb['large'].'" alt="'.$thumb['title'].'" title="'.$thumb['title'].'" border="0"'.$wh.' />';

Title: Re: IOSR images processing feature request
Post by: ahmet on February 10, 2011, 00:30:01
http://booking.isopensource2.com/reservations/chania/crete-chania-hotel.html
Is it possible to make it in my website using nikos bot????
and make sets like nikos module and open them shadowbox??

here is how i put..(nikos put)

http://www.globalpanorama.net/bodrum-satilik-emlak/yazlik-evler-daire-villalar/bodrum-merkezde-deniz-manzarali.html

thanks nikos, is it also possible to change background