[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-dev
Subject:    Re: [PHP-GTK-DEV] GdkPixbuf Trouble
From:       Andrei Zmievski <andrei () gravitonic ! com>
Date:       2006-04-03 5:49:12
Message-ID: DF4BB37E-B0CA-4B59-8B7D-81B6C81F719A () gravitonic ! com
[Download RAW message or body]

You are not passing the right parameters in, then. If you look at the  
code;

     if (rowstride == -1) {
         rowstride = width * 3;
     }
     if (rgb_buf_len < rowstride * (height-1) + width * 3) {
         php_error(E_WARNING, "RGB buffer is not large enough");
         return;
     }

Basically, your rowstride, width, and height parameters need to match  
up with the buffer length. And it also depends on whether you are  
using RGB or RGBA buffers.

-Andrei


On Mar 31, 2006, at 10:31 AM, Anant Narayanan wrote:

> Christian,
>
>>> I made overrides for draw_rgb_image() and draw_rgb_32_image(). The
>>> _dithalign versions are no more. Try it now.
>> Does that mean that the gdkpixbuf animation example should work now?
>
> I tried, and this is what I get instead:
>
> Warning: RGB buffer is not large enough in
> /home/anant/php/php-gtk/test/bug_pixbuf-demo.php on line 78
>
> I tried with both the rgb and rgb_32 methods.
>
> Regards,
> -- 
> Anant
>
> Find Freedom, Go Open Source!
> http://www.kix.in/

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic