Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Unable to call toGDImage()
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  21 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
JohnnyWang  
View profile  
 More options Apr 9 2008, 11:49 pm
From: JohnnyWang <ronald.sec...@gmail.com>
Date: Wed, 9 Apr 2008 20:49:00 -0700 (PDT)
Subject: Unable to call toGDImage()
Hello,

I've tried the solutions found in this group but am still receiving
the following error:

/usr/local/apache2/bin/httpd: symbol lookup error: /usr/local/Zend/
Core/lib/php/20060613/ffmpeg.so: undefined symbol: img_convert

I have compiled ffmpeg with it's default configuration, and based on
the config.h it states:
 --enable-swscale         software scaler support [default=no]

Any ideas?

Here is my php code:

$movie = new ffmpeg_movie( 'test.flv' );
$numFrames = $movie->getFrameCount();
$randFrameNum = rand( 1, $numFrames );
$frame = $movie->getFrame( $randFrameNum );

if ( $frame instanceof ffmpeg_frame ) {
        $gdImg = $frame->toGDImage();

} else {

        die('unable to get frame!' );

}

the script dies when calling the toGDImage() function.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Kirby  
View profile  
 More options Apr 10 2008, 1:10 am
From: "Todd Kirby" <ffmpeg....@gmail.com>
Date: Wed, 9 Apr 2008 19:10:21 -1000
Local: Thurs, Apr 10 2008 1:10 am
Subject: Re: [ffmpeg-php] Unable to call toGDImage()

ffmpeg-php wont work if swscale is enabled.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jne  
View profile  
 More options Apr 10 2008, 4:17 am
From: Jne <goo...@neuveglise.net>
Date: Thu, 10 Apr 2008 01:17:00 -0700 (PDT)
Subject: Re: Unable to call toGDImage()
I also have this issue on a new box intalled with Debian 64bits

ffmpeg had no been compiled with swscale.

both ffmpeg and ffmpeg-php have been compiled against latest svn
version as of yesterday for ffmpeg and today for ffmpeg-php

code is :

ffmovie = new ffmpeg_movie($input_file, false) or die("sorry we cannot
analyse your file");
$duration = $ffmovie->getDuration();
$img = $ffmovie->getFrame(140);

$img_width = $img->getWidth();
$img_height = $img->getHeight();
$ratio = 150 / $img_width;
$img->resize(150, ((int) ($img_height * $ratio / 2)) * 2);
$imgGD = $img->toGDImage();
--> draws an errror : Fatal error: failed to convert frame to gd image
in test.php on line 9

phpinfo returns
ffmpeg support (ffmpeg-php)     enabled
ffmpeg-php version      0.5.2.1
libavcodec version      Lavc51.54.0
libavformat version     Lavf52.13.0
ffmpeg-php gd support   enabled

GD Support      enabled
GD Version      2.0 or higher
FreeType Support        enabled
FreeType Linkage        with freetype
FreeType Version        2.2.1
T1Lib Support   enabled
GIF Read Support        enabled
GIF Create Support      enabled
JPG Support     enabled
PNG Support     enabled
WBMP Support    enabled

help appreciated !


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Kirby  
View profile  
 More options Apr 10 2008, 7:53 am
From: "Todd Kirby" <ffmpeg....@gmail.com>
Date: Thu, 10 Apr 2008 01:53:58 -1000
Local: Thurs, Apr 10 2008 7:53 am
Subject: Re: [ffmpeg-php] Re: Unable to call toGDImage()

ffmpeg-php svn is not stable at the moment. Use 0.5.1 or 0.5.2.1

-T-


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jne  
View profile  
 More options Apr 10 2008, 9:03 am
From: Jne <goo...@neuveglise.net>
Date: Thu, 10 Apr 2008 06:03:57 -0700 (PDT)
Local: Thurs, Apr 10 2008 9:03 am
Subject: Re: Unable to call toGDImage()
Hi thanks, but 0.5.2.1 was the first version I tried with same effet.

When trying to ./configure 0.5.1 it does not find ffmpeg headers.

On 10 avr, 13:53, "Todd Kirby" <ffmpeg....@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JohnnyWang  
View profile  
 More options Apr 10 2008, 4:04 pm
From: JohnnyWang <ronald.sec...@gmail.com>
Date: Thu, 10 Apr 2008 13:04:41 -0700 (PDT)
Local: Thurs, Apr 10 2008 4:04 pm
Subject: Re: Unable to call toGDImage()
I do not swscale enabled.  I purposely compiled by hand to ensure that
swscale was not being enabled.  I am also currently using ffmpeg-
php-0.5.2.1.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
joh  
View profile  
 More options Apr 25 2008, 8:50 am
From: joh <dewo...@gmail.com>
Date: Fri, 25 Apr 2008 05:50:18 -0700 (PDT)
Local: Fri, Apr 25 2008 8:50 am
Subject: Re: Unable to call toGDImage()
Any pdate on this? Did you manage to get it working? I've got the
exact same problem and it seems to fail in _php_avframe_to_gd_image()
in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().

On Apr 10, 5:49 am, JohnnyWang <ronald.sec...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
joh  
View profile  
 More options Apr 25 2008, 10:48 am
From: joh <dewo...@gmail.com>
Date: Fri, 25 Apr 2008 07:48:44 -0700 (PDT)
Local: Fri, Apr 25 2008 10:48 am
Subject: Re: Unable to call toGDImage()
Discovered that using the previous version of ffmpeg-php: 0.5.1 it
worked perfectly.

On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Kirby  
View profile  
 More options Apr 25 2008, 4:40 pm
From: "Todd Kirby" <ffmpeg....@gmail.com>
Date: Fri, 25 Apr 2008 10:40:01 -1000
Local: Fri, Apr 25 2008 4:40 pm
Subject: Re: [ffmpeg-php] Re: Unable to call toGDImage()

>I've got the
> exact same problem and it seems to fail in _php_avframe_to_gd_image()
> in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().

Can you post the error that you get.  I've not seen that one before.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
olivertempel@googlemail.c om  
View profile  
 More options May 21 2008, 3:22 am
From: "olivertem...@googlemail.com" <olivertem...@googlemail.com>
Date: Wed, 21 May 2008 00:22:51 -0700 (PDT)
Local: Wed, May 21 2008 3:22 am
Subject: Re: Unable to call toGDImage()
Exists any update?
Ive got the same error.
ffmpeg compiled without swscale (./configure --enabled-shared --
disabled-swscale)
ffmpeg-php version 5.2.1 compilation ok

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
greg  
View profile  
 More options Jun 9 2008, 8:18 pm
From: greg <gsidbe...@gmail.com>
Date: Mon, 9 Jun 2008 17:18:08 -0700 (PDT)
Local: Mon, Jun 9 2008 8:18 pm
Subject: Re: Unable to call toGDImage()
I'm experiencing the same issue:

ffmpeg-php version      0.5.3
libavcodec version      Lavc51.57.1
libavformat version     Lavf52.14.0
ffmpeg-php gd support   enabled

I'll attempt a down grade and let you know what happens

On Apr 25, 2:40 pm, "Todd Kirby" <ffmpeg....@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
greg  
View profile  
 More options Jun 13 2008, 5:23 am
From: greg <gsidbe...@gmail.com>
Date: Fri, 13 Jun 2008 02:23:14 -0700 (PDT)
Local: Fri, Jun 13 2008 5:23 am
Subject: Re: Unable to call toGDImage()
I've tried all available versions of ffmpeg-php. I'm receiving the
same issue with in each version withn PHP 5.2.3-1ubuntu6.3  on mint
4 / ubuntu 7.10. I'll do a fresh install on a remote ubuntu server and
update this thread if I find the issue.

On Jun 9, 6:18 pm, greg <gsidbe...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Romain  
View profile  
 More options Jun 16 2008, 1:51 pm
From: Romain <imp...@gmail.com>
Date: Mon, 16 Jun 2008 10:51:38 -0700 (PDT)
Local: Mon, Jun 16 2008 1:51 pm
Subject: Re: Unable to call toGDImage()
Got the same problem as everybody

I tried on ffmpeg-php 5.2.1 and 5.3.1, swscale disabled at
compilation.

is anyone got an issue ?

On 13 juin, 11:23, greg <gsidbe...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Romain  
View profile  
 More options Jun 17 2008, 1:57 pm
From: Romain <imp...@gmail.com>
Date: Tue, 17 Jun 2008 10:57:41 -0700 (PDT)
Local: Tues, Jun 17 2008 1:57 pm
Subject: Re: Unable to call toGDImage()
Hi

First sorry for my bad english, but i got a good news

I was like everybody in this topic, i mean :

Debian etch, php5
I tried  to install ffmpeg-php 5.1 5.2.1 5.3.1 lots of time with many
configs, it never worked.

I used to install php and gd with the apt-get.
Today, I tried to install everything from scratch and compile myself
php --with-gd

I installed the ffmpeg-php 5.3.1 and it works !

Try to compile php with gd rathert than load it as module.

I'll try to do it on another station where it didn't work in the past
and i'll keep you informed if it's a real issue.

Romain

On 16 juin, 19:51, Romain <imp...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Kirby  
View profile  
 More options Jun 17 2008, 2:17 pm
From: "Todd Kirby" <ffmpeg....@gmail.com>
Date: Tue, 17 Jun 2008 08:17:04 -1000
Local: Tues, Jun 17 2008 2:17 pm
Subject: Re: [ffmpeg-php] Re: Unable to call toGDImage()

Hmm so it's not detecting gd when loaded as an extension. There is a
configuration option in ffmpeg-php to skip checking for gd at compile time
and assume it's installed.

--enable-skip-gd-check

That may work in this situation.

-Todd


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Romain  
View profile  
 More options Jun 18 2008, 8:14 am
From: Romain <imp...@gmail.com>
Date: Wed, 18 Jun 2008 05:14:14 -0700 (PDT)
Local: Wed, Jun 18 2008 8:14 am
Subject: Re: Unable to call toGDImage()
I'll try and give feedback : )

On 17 juin, 20:17, "Todd Kirby" <ffmpeg....@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Romain  
View profile  
 More options Jun 18 2008, 8:37 am
From: Romain <imp...@gmail.com>
Date: Wed, 18 Jun 2008 05:37:59 -0700 (PDT)
Local: Wed, Jun 18 2008 8:37 am
Subject: Re: Unable to call toGDImage()
Hi again

The --enable-skip-gd-check option at compilation does not solve the
problem in my case on that conf :

php5 with gd as module

ffmpeg
ffmpeg support (ffmpeg-php)     enabled
ffmpeg-php version      0.5.3.1
libavcodec version      Lavc51.57.0
libavformat version     Lavf52.14.0
ffmpeg-php gd support   enabled

Directive       Local Value     Master Value
ffmpeg.allow_persistent 0       0
ffmpeg.show_warnings    0       0

gd
GD Support      enabled
GD Version      2.0 or higher
FreeType Support        enabled
FreeType Linkage        with freetype
FreeType Version        2.2.1
T1Lib Support   enabled
GIF Read Support        enabled
GIF Create Support      enabled
JPG Support     enabled
PNG Support     enabled
WBMP Support    enabled

When using the toGDimage() methode, get the error "Fatal error: failed
to convert frame to gd image"

On 18 juin, 14:14, Romain <imp...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
volk  
View profile  
 More options Jun 23 2008, 5:33 am
From: volk <v2005_2...@mail.ru>
Date: Mon, 23 Jun 2008 02:33:27 -0700 (PDT)
Local: Mon, Jun 23 2008 5:33 am
Subject: Re: Unable to call toGDImage()
I've found a solution:

replace a line 402 in ffmpeg_frame.c as:
...
for( x = 0; x < width; x++ ) {
- : if( dbImageBoundsSafeMacro( dest, x, y ) ) {
+: if( 1 ) {
...

It works.
=)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Kirby  
View profile  
 More options Jun 23 2008, 3:03 pm
From: "Todd Kirby" <ffmpeg....@gmail.com>
Date: Mon, 23 Jun 2008 09:03:35 -1000
Local: Mon, Jun 23 2008 3:03 pm
Subject: Re: [ffmpeg-php] Re: Unable to call toGDImage()

I've backed out the bounds check again in svn. That has been a problem on
and off for a long time.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
voodoo  
View profile  
 More options Jul 2 2008, 4:42 pm
From: voodoo <apop...@gmail.com>
Date: Wed, 2 Jul 2008 13:42:18 -0700 (PDT)
Local: Wed, Jul 2 2008 4:42 pm
Subject: Re: Unable to call toGDImage()
I try to make more correct patch. It works:

machine $ diff -u ffmpeg_frame.c.orig ffmpeg_frame.c
--- ffmpeg_frame.c.orig 2008-06-10 05:00:14.000000000 +0400
+++ ffmpeg_frame.c      2008-07-03 00:29:56.000000000 +0400
@@ -59,6 +59,7 @@

 // Borrowed from gd.c
 #define gdImageBoundsSafeMacro(im, x, y) (!((((y) < (im)->cy1) ||
((y) > (im)->cy2)) || (((x) < (im)->cx1) || ((x) > (im)->cx2))))
+#define gdImageBoundsSafeMacroFixed(x, y, w, h) (!(((y) < 0) || ((y)

>= (h)) || ((x) < 0) || ((x) >= (w))))

 static int le_gd; // this is only valid after calling
                   // FFMPEG_PHP_FETCH_IMAGE_RESOURCE()
@@ -399,7 +400,7 @@
     for (y = 0; y < height; y++) {
         for (x = 0; x < width; x++) {

-                       if (gdImageBoundsSafeMacro(dest, x, y)) {
+                       if (gdImageBoundsSafeMacroFixed(x, y, dest-

>sx, dest->sy)) {

                 /* copy pixel to gdimage buffer zeroing the alpha
channel */
                 dest->tpixels[y][x] = src[x] & 0x00ffffff;
             } else {
machine $

On 23 июн, 23:03, "Todd Kirby" <ffmpeg....@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
voodoo  
View profile  
 More options Jul 3 2008, 1:30 am
From: voodoo <apop...@gmail.com>
Date: Wed, 2 Jul 2008 22:30:53 -0700 (PDT)
Local: Thurs, Jul 3 2008 1:30 am
Subject: Re: Unable to call toGDImage()
Just faster patch, it works too:

machine $ diff -u ffmpeg_frame.c.orig ffmpeg_frame.c
--- ffmpeg_frame.c.orig 2008-06-10 05:00:14.000000000 +0400
+++ ffmpeg_frame.c      2008-07-03 09:20:37.000000000 +0400
@@ -396,15 +396,16 @@
     int x, y;
     int *src = (int*)frame->data[0];

+    if (width > dest->sx || height > dest->sy)
+    {
+        return -1;
+    }
+
     for (y = 0; y < height; y++) {
         for (x = 0; x < width; x++) {

-            if (gdImageBoundsSafeMacro(dest, x, y)) {
-                /* copy pixel to gdimage buffer zeroing the alpha
channel */
-                dest->tpixels[y][x] = src[x] & 0x00ffffff;
-            } else {
-                return -1;
-            }
+            /* copy pixel to gdimage buffer zeroing the alpha channel
*/
+            dest->tpixels[y][x] = src[x] & 0x00ffffff;
         }
         src += width;
     }
machine $


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »