Hello. I have this code and the getFrame returns a GD truecolor image.

However, I want to convert to imagemagick after I get that frame from
ffmpeg.

Here's my code:

// GRAB A FRAME FROM THE VIDEO FOR A THUMB VIEW 
$video = new ffmpeg_movie($data_temp, false);
$frame = $video->getFrame(90); //returns a ffmpeg_frame() object
$frame_full = $frame->toGDImage(); // Returns a truecolor GD image of the
frame.

// Here is where it fails so I'm assuming I need to convert the $frame_full
into something Imagick friendly. Any ideas? Or am I not returning any data
to the frame_full to process?

$frame_full = new Imagick($frame_full);
// get dimensions
$frame_height = $frame_full->getImageHeight();
$frame_width = $frame_full->getImageWidth();


ERROR:

<b>Fatal error</b>:  Uncaught exception 'ImagickException' with message 'Can
not process empty Imagick object' in
/home/httpd/html/domain.com/public_html/upload/albums.php:214
Stack trace:
#0 /home/httpd/html/domain.com/public_html/upload/albums.php(214):
Imagick-&gt;getimageheight()
#1 /home/httpd/html/domain.com/public_html/upload/albums.php(26):
upload_content(Object(ADODB_mysql), '58669', '77', 'my videos', 'video')
#2 {main}
  thrown in <b>/home/httpd/html/domain.com/public_html/upload/albums.php</b>
on line <b>214</b><br />


Thanks for any help, T


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to