#19931 closed enhancement (duplicate)
media.php image interlace filter
Reported by: | bobbravo2 | Owned by: | bobbravo2 |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3.1 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
in wp-includes/media.php:448
imageinterlace($newimage, apply_filters('image_interlace',false);
See the pull request on github:
https://github.com/bobbravo2/WordPress/pull/new/patch-1?quick_pull=1
Attachments (1)
Change History (18)
#2
in reply to:
↑ description
@
13 years ago
#3
follow-up:
↓ 4
@
13 years ago
I think we should pass in $orig_type
as a second parameter to the filter so that people can interlace only for certain image types.
Also, please space out your code a bit, like so:
imageinterlace( $newimage, apply_filters( 'image_interlace', false, $orig_type ) );
#4
in reply to:
↑ 3
@
13 years ago
Replying to markjaquith:
I think we should pass in
$orig_type
as a second parameter to the filter so that people can interlace only for certain image types.
Also, please space out your code a bit, like so:
imageinterlace( $newimage, apply_filters( 'image_interlace', false, $orig_type ) );
Done
#5
@
13 years ago
I can confirm that this filter works as intended for PNG, JPG, but NOT gif because "Underlying library (GD) does not support this feature."
To verify that the interlace bit has been set on JPG and PNG images, use ImageMagick
verify -verbose IMAGE_NAME.png/jpg
However, the filter does not cause any error on attempting to set the imageinterlace bit on a GIF
#7
follow-up:
↓ 8
@
13 years ago
Would it make sense to perhaps pass $newimage by reference to an action, then any number of functions could be run on it? Or would that give unnecessary control?
#8
in reply to:
↑ 7
@
13 years ago
Replying to nacin:
Would it make sense to perhaps pass $newimage by reference to an action, then any number of functions could be run on it? Or would that give unnecessary control?
I think that's not necessary, as I see this filter as being defined once by a theme that heavily uses WordPress image_resize function. I think it may give too much control.
#12
follow-up:
↓ 13
@
12 years ago
- Version changed from 3.4 to 3.3.1
Version field indicates when the enhancement was initially suggested.
#13
in reply to:
↑ 12
@
12 years ago
Replying to SergeyBiryukov:
Version field indicates when the enhancement was initially suggested.
Thanks! I'm still learning my way around.
*Here is the public patch on github:*
Public https://github.com/bobbravo2/WordPress/commit/218d3ba7020854fe7daab7f3f8db8b1528d794e5