#19931 closed enhancement (duplicate)
media.php image interlace filter
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 3.3.1 |
| Severity: | normal | Keywords: | |
| Cc: | bobbravo2 |
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)
comment:2
in reply to:
↑ description
bobbravo2 — 16 months ago
comment:3
follow-up:
↓ 4
markjaquith — 16 months 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 ) );
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
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
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?
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.
comment:10
bobbravo2 — 14 months ago
- Keywords dev-feedback added; needs-docs removed
comment:11
bobbravo2 — 13 months ago
- Version changed from 3.3.1 to 3.4
comment:12
follow-up:
↓ 13
SergeyBiryukov — 13 months ago
- Version changed from 3.4 to 3.3.1
Version field indicates when the enhancement was initially suggested.
comment:13
in reply to:
↑ 12
bobbravo2 — 12 months ago
Replying to SergeyBiryukov:
Version field indicates when the enhancement was initially suggested.
Thanks! I'm still learning my way around.
comment:14
bobbravo2 — 9 months ago
Bump — any guidance on getting this added to the next release?
comment:15
SergeyBiryukov — 9 months ago
Related: #21668
comment:16
markoheijnen — 6 weeks ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from accepted to closed
Duplicate of #21668.
comment:17
markoheijnen — 6 weeks ago
- Keywords has-patch dev-feedback removed

*Here is the public patch on github:*
Public https://github.com/bobbravo2/WordPress/commit/218d3ba7020854fe7daab7f3f8db8b1528d794e5