Search found 6 matches

by makke
Thu Dec 08, 2016 10:13 pm
Forum: Linux
Topic: Convert PIXBUF to PB_Image
Replies: 7
Views: 3814

Re: Convert PIXBUF to PB_Image

Ah, ok, you think the the destination Pixbuf can be the Purebasic image ? I'll try it out and post the results here.

[EDIT:]
It works, look:

EnableExplicit

ImportC ""
g_error_free (*error.GError)
gdk_pixbuf_get_width (*pixbuf)
gdk_pixbuf_get_height (*pixbuf)
gdk_pixbuf_new_from_file ...
by makke
Thu Dec 08, 2016 9:58 pm
Forum: Linux
Topic: Pseudotypes - default value and arrays
Replies: 0
Views: 2051

Pseudotypes - default value and arrays

Hello,

I test this:

ImportC ""
gdk_pixbuf_save (*pixbuf, filename.p-utf8, type.p-utf8 = "jpeg", *error.GError = #Null)
gdk_pixbuf_savev (*pixbuf, filename.p-utf8, type.p-utf8, Array option_keys.p-utf8(1), Array option_values.p-utf8(1), *error.GError)
EndImport


With pseudotypes it is not ...
by makke
Thu Dec 08, 2016 9:53 pm
Forum: Linux
Topic: Convert PIXBUF to PB_Image
Replies: 7
Views: 3814

Re: Convert PIXBUF to PB_Image

You could try CreateImage and use gdk_pixbuf_copy_area to copy the pixbuf to the PB created image.

It's like Drawimage(). But thanks for the suggestion.

Here ist my procedure for this:

Procedure.i Pixbuf_ConvertToImage(Pixbuf.i)
Protected.i image, w, h, a
w = gdk_pixbuf_get_width(Pixbuf)
h ...
by makke
Tue Nov 29, 2016 9:26 pm
Forum: Linux
Topic: Convert PIXBUF to PB_Image
Replies: 7
Views: 3814

Re: Convert PIXBUF to PB_Image

Sure, thank you, my first post was a bit inaccurate. I know that all functions the need the ImageID() function, can handle the pixbuf pointer (e.g. SetGadgetState(#ImageGadget, PIXBUF_ptr)). I thought about more/other options.
by makke
Sun Nov 27, 2016 9:39 pm
Forum: Linux
Topic: Convert PIXBUF to PB_Image
Replies: 7
Views: 3814

Convert PIXBUF to PB_Image

Hello,

I am am testing some functions of GTK and GDK, during the use of the PIXBUF and the PB internal image handling I come to some limitations. Is there any other way than StartDrawing()-StopDrawing() to convert a PIXBUF image to a PB image ?

Any tips ?
by makke
Sun Nov 27, 2016 9:36 pm
Forum: Linux
Topic: Import SYSLOG - Pseudotype bug/error?
Replies: 1
Views: 3145

Import SYSLOG - Pseudotype bug/error?

Hello,

I Import the GNU C syslog functions to post in the system's syslog (I add an include at the end of the post). The import have some strange behavior, the syslog functions need the strings in ASCII format, so I use the pseudotype during import. But, the function openlog() didn't accept it, if ...