Remove image compression from uploads?

mitch / 2012-06-06 21:53:13   

Based on this thread: indexhibit.org/forum/thread/15287/ I was curious if there is any way to entirely remove image compression on upload? i am sizing and compressing the images outside of indexhibit and would like them not to get processed at all on upload. i noticed that changing the value from '90' to '100' actually makes for an image with a larger filesize than i started with, I do not know what setting to use to not to anything to the image at all. can i simply remove this:

  1. // image quality
  2. $default['img_quality'] = 90;
  3. $default['systhumb'] = 150;

from the options.php file?

thanks!

Vaska A / 2012-06-07 00:08:43   

The problem is the format (jpeg). I've been reading on these problems lately to refresh myself with where things are going wrong. This thread at Stackoverflow says quite alot:

stackoverflow.com/questions/10370261/…

As soon as I can I'll expedite the Imagick library for things (which is not available on all hosts though) - it should help some.

mitch / 2012-06-07 17:53:27   

thanks vaska, sounds like a good plan to me!

ilkergoksen / 2012-06-13 19:08:04   

Mitch,

I realized that problem while I was playing around with Indexhibit today to see what I can do since I am still learning and did not start using it yet. I always prepare my photos for web before uploading them to the server. Some of my photos that were 80-90kb increased to almost 200kb and the ones around 120kb become almost 300kb. I also realized that their dpi increased from 72 to 96.

However, I think I found a way around this problem. Try it for yourself to see if it works for you. First create your exhibit and upload your images to your gallery like you normally would with Indexhibit. After you're done, download filesgimps folder. Inside, you'll see all your images that you uploaded and their sizes will have increased and they are compressed. Then simply replace them with the ones that you prepared for web on your computer making sure that the titles are the same. Because Indexhibit adds numbers to the image titles after you upload. And then upload this file back to your server and you should have the images at the file size and quality you wanted them to be. Although this procedure can really be a hassle if you have lots of photo, maybe it is worth giving a try.

Good luck!

Vaska A / 2012-06-13 19:27:27   

That is not really a good idea and will likely lead to other problems.

ilkergoksen / 2012-06-13 20:33:42   

Vaska,

Would it still be problematic if we replaced only the photos but not the file itself. I looked again and there are some other files in that folder in addition to the photos we upload. So if there is a jpeg file named "image1" with a resolution of 700x500, and I replace only that file that has the same name and resolution, would that still be problem? Thanks!

Vaska A / 2012-06-13 20:40:45   

As a short term fix it could be ok - just do not change the image or thumbnail shape after you have replaced things. Also, Indexhibit makes a liberal use of dynamically generated thumbnails on some pages - and the horizontal format does as well. So, you must set your stuff up first.

Longer term, because this is really related to the GD library, the standard PHP image processing tool, we will utilize Imagick since it does a better job of these things. However, not all hosts have this built-in.

So, that's the caveat to your idea...and that will be the plan for the future.

ilkergoksen / 2012-06-13 20:48:52   

Thank you, yeah I am not going to use thumbnails, just trying to learn how all these things and codes work until slideshow comes out.

Vaska A / 2012-06-13 20:52:25   

Sorry. The hang up has been the upgrade tool. I'm really looking forward to spending a few solid days putting out updated formats and some new ones.

ilkergoksen / 2012-06-13 20:57:12   

Yeah, I understand, it must be a lot of stuff added to the top of your own work. Take your time.

Just a reminder, I am done with the translation %99. You got my email?

This thread has been closed, thank you.