Getting a GD image from WP_Image_Editor
-
Hey there. I’m trying to do some image manipulation for a custom plugin, and some of it requires a bit more than the WP_Image_Editor really provides (Like making new images), and part of my requirements is to manipulate a WP_Image_Editor image in GD, and I’d rather not deal with files.
I tried using the WP_Image_Editor::stream function, but it seems to always return 1 when I put that output into the error_log.
My code is here:
function wpToGD($image_wp){ error_log(print_r($image_wp->stream())); return imagecreatefromstring($image_wp->stream()); }
Is there something I’m missing here? Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Getting a GD image from WP_Image_Editor’ is closed to new replies.