Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Bloat on normal images produced form gifs - Bandwidth hell!  (Read 8445 times)

0 Members and 1 Guest are viewing this topic.

loafer

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Bloat on normal images produced form gifs - Bandwidth hell!
« on: November 16, 2003, 05:05:04 pm »

Hi there!

I think I have found a problem with uploading gif images that get a normal view created.
I've uploaded a pretty normal gif that is 44.97 KB (46054 bytes)
The normal image that has been created is 223.02 KB (228371 bytes)!

That's almost 5 times bigger!

Any idea what's going on? or better still an idea of what I can do to fix it? :?

Loaf.
Logged

Oasis

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 252
  • iNSiGNiA
    • Pixnet Gallery
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #1 on: November 17, 2003, 12:07:45 am »

Yes, I have noticed this problem too.
But I assume it is a limitation of imagemagick...
One of my users uploaded a 59K animated gif,
and the thumbnail turned out 750K.

Do any of the dev team members know imagemagick well enough to find a way to fix this?
Logged
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #2 on: November 17, 2003, 05:18:27 am »

This is expected behavior for Image Magick.  Due to the Unisys patent, no one may use LZW-compression without paying Unisys. This patent expired in the US in June of this year, and it will expire in the rest of the world in June/July 2004. GD dealt with this problem by removing GIF creation capability from GD.  Image Magick dealt with the problem by removing GIF compression. So Image Magick can create a GIF, but it cannot compress it. This is why your GIFs become so large.

Both teams have said they will return this function when all patent issues are resolved.

It is posible to work around this problem if you wish to manually reisze the GIFs and place them in the file system.  However, this may not be feasible for people with thousands of GIFs.  Some developers are working on animated PNGs; they may have progessed since I last read about their project.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Oasis

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 252
  • iNSiGNiA
    • Pixnet Gallery
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #3 on: November 17, 2003, 07:23:33 pm »

Good good good... I will be looking forward to the new versions...
I don't like having a 800K gif on the front page.  :lol:
Logged
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

Oasis

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 252
  • iNSiGNiA
    • Pixnet Gallery
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #4 on: November 17, 2003, 09:06:39 pm »

I have a suggestion... Since we probably will have to wait at least half a year before the new versions come out, could we have a workaround for the time being?

As we know, resizing the gifs into thumbnails are going to create even larger files... Then why don't we just skip the IM resizing and show the original gif as the thumbnail? There's not much point in creating a smaller thumbnail if it's going to be a bigger size... Why not just show the original and specify the display size??
Logged
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

loafer

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #5 on: November 18, 2003, 08:56:49 pm »

Hell, I'd settle for a hacked version of imagemagick I could slap in the directory with a shellscript and a cronjob!
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #6 on: November 18, 2003, 11:50:21 pm »

Loafer,

*looks around for flying army of monkey lawyers*

Since you seem to know something about *nix, I'll tell you a secret. It is supposed to be possible to manually compile Image Magick with LZW compression turned on . . . you might check Google. If you're in the US, it's perfectly legal.

*scuttles away before Unisys can issue a subpoena*

-Hyperion
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #7 on: November 19, 2003, 12:13:29 am »

Oasis,

Skipping GIF resizing for thumbnails in IM would require slight modifications to include/picmgmt.inc.php.  

Then you would need to modify include/functions.inc.php display_thumbnails to give GIFs width and height parameters in the HTML img tag.

Alternatively, you could modify the display thumbnail function to skip the display GIFs larger than a certain size when the album is a meta album like random and last added.

-Hyperion
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

loafer

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #8 on: November 19, 2003, 09:12:34 am »

The server is int he USA so I guess we could then ?
Logged

loafer

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #9 on: November 19, 2003, 09:43:34 am »

Just a sec - couldn't coppermine use PNG in this case?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #10 on: November 19, 2003, 09:50:11 am »

Coppermine always can use png, and you're encouraged to use png whenever possible (some people around may even remember the "burn all gifs" campaign some time ago).

[off topic]Yeah, I think gifs s**k as material to appear in a gallery, but I didn't want to come up with a flame war on this issue. I believe in forcing M$ and the other browser creators to fully support png by getting rid of gif support, but that's just my personal opinion.[/off topic]

GauGau
Logged

loafer

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #11 on: November 19, 2003, 10:09:37 am »

You missed my point, so I'll ask you a different way.

How do I get coppermine to only use png for processed images of gifs?
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #12 on: November 19, 2003, 06:13:34 pm »

Coppermine can use image magick to convert regular GIFs to PNG, and it can convert animated GIFS to MNG.  However, there is no browser that I know of that can display MNGs.

To do this, you would modify include/picmgmt.inc.php.  You would need to chop the extension off of a cast of the GIF filename, and then append the .png extension. You would then use the modified cast of the filename in place of the orginal filename in the file formulation varialbles $normal and $thumb near the beginning of the file.  Image Magick does the rest for you.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Satrina

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #13 on: May 10, 2004, 05:05:02 pm »

Has anyone tried the above mentioned thing? I am a total newbie when it comes to php, but I would really like to eith have it skip resizing gifs or do something else entirely. As they just come out looking bad and larger then the original. Step by step how to would be so appriciated! :) I know I know why use gifs! I have one of those evil forums filled with peoples animated sigs and all they know is gifs ;)

Would really appriciate help here! thank you so much! I read a bunch of another posts but didn't see an exact answer or if the above method worked well.

thank you!

-Marie
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #14 on: May 11, 2004, 01:50:03 am »

I don't think anyone ever tried it to comment on whether or not it would work well. 

Just to let you know, GD and IM will reintroduce GIF support in a month or so.  If you can compile ImageMagick, they have finally put clear instructions on how to compile IM with LZW compression on their website. I also think the animated GIF corruption problem was fixed in one of the more recent releases of IM. This topic was posted around 5.7, and they are now at 6.X.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Satrina

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Bloat on normal images produced form gifs - Bandwidth hell!
« Reply #15 on: May 11, 2004, 02:23:52 am »

Thanx for the info, I can wait then! :) I am using the latest IM though.

-Marie
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 18 queries.