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: Basil L. Contovounesios
Subject: bug#34873: 27.0.50; Creating unibyte string in emacs modules
Date: Tue, 07 May 2019 17:55:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: lg.zevlg@gmail.com
>> Date: Sat, 16 Mar 2019 16:28:05 +0100
>> Cc: 34873@debbugs.gnu.org
>> 
>> 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
>
> I'd prefer to provide a way to use user-ptr objects for this purpose,
> rather than allow unibyte strings to be created by modules.  The
> latter is a slippery slope which I think we should rather avoid.
>
> Can you propose a patch that uses user-ptr instead?

Sorry if this is a dumb question, but would the functions
unibyte-string, string-to-unibyte, string-as-unibyte et al. be of any
use here?

-- 
Basil





reply via email to

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