Results 1 to 5 of 5

Thread: CL_PixelBuffer Problem.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Lesser Knight
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    36

    Default CL_PixelBuffer Problem.

    Hello,

    I wanted to use GIMP as level editor for my game. A green dot (0, 255, 0) will be the spawn point for the player but:
    When I load the .PNG file in the CL_PixelBuffer class I get the following error:

    Code:
    Error: contour has less than 2 points.
    I'm not sure what that means...

    Here's the part of the code:
    Code:
    CL_PixelBuffer buffer = CL_PNGProvider::load( "level\\standard\\level01.png" ); <-- Error here
    for( int x = 0; x <= 799; x++ )
    {
        for( int y = 0; y <= 599; y++ )
        {
             if( buffer.get_pixel( x, y ) == CL_Colorf::lime )
    	 {
    	     // Init stuff
    	 }
         }
    }
    I've attached the "level01.png" to the post if that helps.


    Thanks!
    Tuisto
    Attached Images Attached Images  

Similar Threads

  1. operate CL_PixelBuffer as CL_Surface
    By DavinciZhe in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 11-12-2009, 06:05 PM
  2. CL_PixelBuffer::get_pixel() weird results...
    By Otto (Strange) Halmén in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 12-06-2006, 07:36 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •