Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.88k stars 1.5k forks source link

access the core format imagemagick without getCore(); #1327

Closed danielthomascarr closed 5 months ago

danielthomascarr commented 6 months ago

A new function that allows the same but now removed functionality of getCore()

olivervogel commented 6 months ago

You can access the underlying GDImage or Imagick object in an Intervention\Image\Image::class like so:

$result = $image->core()->native();

And for an animated image:

foreach ($image as $frame) {
    $result = $frame->->native()
}
danielthomascarr commented 6 months ago

Thank you for your response, yes I found that looking through the code, but switching between Intervention Image and Imagemagick is a bit trickier with the new version, use to use getCore() and then Image::make would except an Imagick instance to switch back but I can see that the new read() function doesn't, is there any function that could be used instead?