I am trying to load an image. I am running this program
Include "window9.bi"
Dim As integer hwnd,event
hwnd=OpenWindow("1",300,10,800,800)
Var HIMAGE=Load_image("./png_cards/3D.png")
'ButtonImageGadget(1,10,10,152,232,HIMAGE, BS_PUSHLIKE Or BS_AUTOCHECKBOX)
Do
event=WaitEvent()
If event=EventClose Then End
Loop
the image is 152x232.
It compiles, but
I am getting many errors and a core dump. If you remember I am running Fedora 31
This error occurs if the 3D.png file is not at the specified address.
Please note that I recently updated the library. In the update, including I made changes to the Load_image function. Now, if the file is not found, such errors should not be, the function will simply return zero.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to load an image. I am running this program
Include "window9.bi"
Dim As integer hwnd,event
hwnd=OpenWindow("1",300,10,800,800)
Var HIMAGE=Load_image("./png_cards/3D.png")
'ButtonImageGadget(1,10,10,152,232,HIMAGE, BS_PUSHLIKE Or BS_AUTOCHECKBOX)
Do
event=WaitEvent()
If event=EventClose Then End
Loop
the image is 152x232.
It compiles, but
I am getting many errors and a core dump. If you remember I am running Fedora 31
Errors:
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.338: gdk_pixbuf_get_has_alpha: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.338: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.338: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_calculate_rowstride: assertion 'width > 0' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GdkPixbuf-CRITICAL **: 21:09:07.339: gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(load_image:26140): GLib-ERROR *: 21:09:07.339: ../glib/gmem.c:334: overflow allocating 1844674407370955161518446744073709551615 bytes
/tmp/geany_run_script_8Q1RH0.sh: line 7: 26140 Trace/breakpoint trap (core dumped) "./load_image"
I could use a tip on how to deal with these errors.
Thanks for any help, John
Hi!
This error occurs if the 3D.png file is not at the specified address.
Please note that I recently updated the library. In the update, including I made changes to the Load_image function. Now, if the file is not found, such errors should not be, the function will simply return zero.
I am hoping that that update is availble now. I will go get a copy. Thank you.
John