Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#9887 closed enhancement (fixed)

Problem that PNG thumbnail size increases more than original

Reported by: madhyde's profile madhyde Owned by: madhyde's profile madhyde
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.8
Component: Media Keywords: has-patch tested blessed
Focuses: Cc:

Description

When index color PNG is uploaded, WordPress generates full color PNG as a thumbnail.
But, in many cases, the thumbnail file size is larger than the original.
so, I wrote improvement patch. thumbnail color reconvert to same colors as the original(index color).

Attachments (2)

indexPNG.patch (582 bytes) - added by madhyde 16 years ago.
improve index PNG's thumnail
screenshot.png (8.8 KB) - added by madhyde 16 years ago.
ScreenShot

Download all attachments as: .zip

Change History (18)

@madhyde
16 years ago

improve index PNG's thumnail

@madhyde
16 years ago

ScreenShot

#1 follow-up: @dd32
16 years ago

  • Keywords has-patch added
  • Severity changed from major to normal

Couldn't this also be applied to non-png's as well?

#2 @dd32
16 years ago

  • Milestone changed from Unassigned to Future Release

#3 @Denis-de-Bernardy
16 years ago

  • Milestone changed from Future Release to 2.8

#4 @madhyde
16 years ago

Replying to dd32:
I think It's only index PNG's problem.

#5 in reply to: ↑ 1 @Denis-de-Bernardy
16 years ago

Replying to dd32:

Couldn't this also be applied to non-png's as well?

maybe to gif images. trouble with the patch is that the resampling might be better done in true colors, with the number of colors reduced in the aftermath.

#6 @Denis-de-Bernardy
16 years ago

oh, nevermind that, I misread the patch and it seems you did just that.

#7 @dd32
16 years ago

Gif was indeed what i was mainly thinking of.

#8 @madhyde
16 years ago

GIF is reduced automatically by the imagegif function.

#9 follow-up: @azaozz
16 years ago

  • Keywords needs-testing added
  • Milestone changed from 2.8 to Future Release

How much memory would that use for large image?

#10 in reply to: ↑ 9 @madhyde
16 years ago

Replying to azaozz:

How much memory would that use for large image?

Why do you warry about memory? This only applied the same flow as Gif to PNG. If a large image is even up-load, this doesn't use more work area than thumnail size.

#11 @madhyde
16 years ago

  • Keywords tested added; needs-testing removed
  • Milestone changed from Future Release to 2.8
  • Owner set to madhyde
  • Status changed from new to accepted

Did anyone test?
I tested all cases.
PNG(full-color and index-color), GIF(index-color), JPEG(full-color).
No problem.

#12 @Denis-de-Bernardy
16 years ago

haven't had time to test, sorry. but it definitely looks commit-worthy.

#13 @Denis-de-Bernardy
16 years ago

  • Milestone changed from 2.8 to 2.9

punting per IRC discussion

#14 @Denis-de-Bernardy
16 years ago

still applies clean

#15 @matt
16 years ago

  • Keywords blessed added

#16 @azaozz
16 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [11737]) Generate same as original color depth thumbnails for PNG images, props madhyde, fixes #9887

Note: See TracTickets for help on using tickets.