Advertisement:

Author Topic: how to increase the image compression rate...  (Read 885 times)

mandi007

  • Full Member
  • ***
  • Posts: 204
how to increase the image compression rate...
« on: December 22, 2014, 09:48:37 am »
if a image with size 1.2mb is upload  than 
 1.png -1.2mb
 1_original.png -403kb
 1_preview.png -604kb
 1_thumnail.png -203kb

and another file with size of 50 kb is of size
2.png -50kb
2_original.png - 523kb
2_preview.png -23kb
2_thumbnail.png -9kb


i changed my code so to use the original as it has a good quality based on 1.png image size but the second image it is increasing the image size. i am really confused which one should i use.

how can i do image compression so the images are smaller in size with good quality.  any help...
please respond atleast to say this cant be done
                                                                         

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: how to increase the image compression rate...
« Reply #1 on: December 22, 2014, 12:08:10 pm »
Hi,

Sorry no solution for png compression atm.

Regards

mandi007

  • Full Member
  • ***
  • Posts: 204
Re: how to increase the image compression rate...
« Reply #2 on: December 22, 2014, 08:45:56 pm »
tanks for the reply.....dev

my mistake , the extension is jpg.....

do you have any suggestion for the jpg files.

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: how to increase the image compression rate...
« Reply #3 on: December 23, 2014, 12:30:06 pm »
Are you positive about extensions and filetypes? PNGs are problematic as mentioned, I reported this before and tried several solutions (none of them worked, code is simply ignored), later Conejo also tried and gave up since there is an apparent bug with PHP extension, so you may use Force JPEG as a transitional solution if you don't care about quality and retaining transparency. JPEGs already have optimal compression in my opinion: in case of GD since it uses an inferior algorithm which results in a noticeable artefacts lowering it even more is out of the question; with iMagick default quality value is already optimal, don't see a big reason for a change either.

Regards