bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34873: 27.0.50; Creating unibyte string in emacs modules


From: lg . zevlg
Subject: bug#34873: 27.0.50; Creating unibyte string in emacs modules
Date: Sat, 16 Mar 2019 16:28:05 +0100

16 марта 2019 г., в 13:20, Eli Zaretskii <eliz@gnu.org> написал(а):

>> From: lg.zevlg@gmail.com
>> Date: Sat, 16 Mar 2019 11:32:47 +0100
>> Cc: 34873@debbugs.gnu.org
>> 
>> Please explain why you need to create a unibyte string for that.  I
>> guess what's missing is more details regarding what you are trying to
>> do (the single sentence above about :data wasn't enough for me), and
>> how is your module involved in that, in particular why do you need a
>> module to display an image in Emacs.
>> 
>> See this thread 
>> https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00465.html
> 
> I've read that (I read everything on emacs-devel).  It still doesn't
> tell me enough to answer my questions, unfortunately.

Ok, emacs-ffi is emacs module that implements FFI to shared libraries. 
wand-mode is package that implements ffi bindings (using emacs-ffi module) to 
libMagickWand and on top of them powerful image editor is written

wand-mode does many trickery on images in very fast fasion, and it needs method 
to display previews/results in Emacs buffer. Result of image manipulation is 
raw rgb(a) data that seats in user-ptr available from imagemagick without any 
copying. I want `create-image’ with :format ‘image/x-rgb to accept this 
user-ptr as data to make image creation fast

Method proposed by Stefan with make_string/encode-coding-string works, but its 
speed is far from being usable on big images.  There is no method just to use 
data as-is to make things fast


—
lg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]