all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick
       [not found] <CAFyQvY1Vh6US2Nnqk8=YqLNDk3qp5naJEutpMLgy47V==Zug=w@mail.gmail.com>
@ 2014-10-22 17:52 ` Glenn Morris
  2014-10-22 18:45   ` Kaushal
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2014-10-22 17:52 UTC (permalink / raw)
  To: Kaushal; +Cc: 18797


This message was over 1 MB. Please compress attachments in future.
No need to resend this one, since interested people can fetch the attachment
from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18797#5 .
(But I think it has no relevance anyway.)

Kaushal wrote:

> I have compiled emacs with Imagemagick (the config.log file is attached).
>
> But "M-x image-transform-set-scale" is not working for me. The image scale
> stays the same when I set the scale to 0.5. I tested it with bot png and
> jpg images.
>
> But the eimp package is working fine (which uses mogrify from Imagemagick).
>
> When an image is open in a buffer, evaluating "(eq image-type
> 'imagemagick)" returns "nil".

Right, so it's not an ImageMagick image, so you can't transform it.
Emacs uses libjpeg for jpgs by default.
Try testing it on a format that Emacs does't support otherwise, eg bmp.
You have to force the images to be created with type imagemagick to be
able to scale them. This remains poorly documented IMO; 
http://debbugs.gnu.org/10746

> What am I missing in enabling the imagemagick detection for functions like
> image-transform-set-scale?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick
  2014-10-22 17:52 ` bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick Glenn Morris
@ 2014-10-22 18:45   ` Kaushal
  2014-10-22 18:50     ` Kaushal
  0 siblings, 1 reply; 6+ messages in thread
From: Kaushal @ 2014-10-22 18:45 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 18797

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

Thanks for your reply.

I evaluated (setq image-type-header-regexps nil) and verified that it is
actually set to nil by doing C-h v on that variable.

But (eq image-type 'imagemagick) is still returning nil and I am M-:
(image-transform-set-scale 0.1) still does nothing.




--
Kaushal Modi

On Wed, Oct 22, 2014 at 1:52 PM, Glenn Morris <rgm@gnu.org> wrote:

>
> This message was over 1 MB. Please compress attachments in future.
> No need to resend this one, since interested people can fetch the
> attachment
> from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18797#5 .
> (But I think it has no relevance anyway.)
>
> Kaushal wrote:
>
> > I have compiled emacs with Imagemagick (the config.log file is attached).
> >
> > But "M-x image-transform-set-scale" is not working for me. The image
> scale
> > stays the same when I set the scale to 0.5. I tested it with bot png and
> > jpg images.
> >
> > But the eimp package is working fine (which uses mogrify from
> Imagemagick).
> >
> > When an image is open in a buffer, evaluating "(eq image-type
> > 'imagemagick)" returns "nil".
>
> Right, so it's not an ImageMagick image, so you can't transform it.
> Emacs uses libjpeg for jpgs by default.
> Try testing it on a format that Emacs does't support otherwise, eg bmp.
> You have to force the images to be created with type imagemagick to be
> able to scale them. This remains poorly documented IMO;
> http://debbugs.gnu.org/10746
>
> > What am I missing in enabling the imagemagick detection for functions
> like
> > image-transform-set-scale?
>

[-- Attachment #2: Type: text/html, Size: 2964 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick
  2014-10-22 18:45   ` Kaushal
@ 2014-10-22 18:50     ` Kaushal
  2014-10-22 20:19       ` Kaushal
  0 siblings, 1 reply; 6+ messages in thread
From: Kaushal @ 2014-10-22 18:50 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 18797

[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]

I went deeper in the references bug posts and I found the answer in bug #
10112!

I had to add:

(add-to-list 'image-type-header-regexps '("\\`\377\330" . imagemagick))

But just for my knowledge, what is "\\`\377\330" ?




--
Kaushal Modi

On Wed, Oct 22, 2014 at 2:45 PM, Kaushal <kaushal.modi@gmail.com> wrote:

> Thanks for your reply.
>
> I evaluated (setq image-type-header-regexps nil) and verified that it is
> actually set to nil by doing C-h v on that variable.
>
> But (eq image-type 'imagemagick) is still returning nil and I am M-:
> (image-transform-set-scale 0.1) still does nothing.
>
>
>
>
> --
> Kaushal Modi
>
> On Wed, Oct 22, 2014 at 1:52 PM, Glenn Morris <rgm@gnu.org> wrote:
>
>>
>> This message was over 1 MB. Please compress attachments in future.
>> No need to resend this one, since interested people can fetch the
>> attachment
>> from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18797#5 .
>> (But I think it has no relevance anyway.)
>>
>> Kaushal wrote:
>>
>> > I have compiled emacs with Imagemagick (the config.log file is
>> attached).
>> >
>> > But "M-x image-transform-set-scale" is not working for me. The image
>> scale
>> > stays the same when I set the scale to 0.5. I tested it with bot png and
>> > jpg images.
>> >
>> > But the eimp package is working fine (which uses mogrify from
>> Imagemagick).
>> >
>> > When an image is open in a buffer, evaluating "(eq image-type
>> > 'imagemagick)" returns "nil".
>>
>> Right, so it's not an ImageMagick image, so you can't transform it.
>> Emacs uses libjpeg for jpgs by default.
>> Try testing it on a format that Emacs does't support otherwise, eg bmp.
>> You have to force the images to be created with type imagemagick to be
>> able to scale them. This remains poorly documented IMO;
>> http://debbugs.gnu.org/10746
>>
>> > What am I missing in enabling the imagemagick detection for functions
>> like
>> > image-transform-set-scale?
>>
>
>

[-- Attachment #2: Type: text/html, Size: 4892 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick
  2014-10-22 18:50     ` Kaushal
@ 2014-10-22 20:19       ` Kaushal
  2014-10-22 20:30         ` Kaushal
  0 siblings, 1 reply; 6+ messages in thread
From: Kaushal @ 2014-10-22 20:19 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 18797

[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]

I have posted a complete solution of what worked for me on Emacs SE:
http://emacs.stackexchange.com/a/2458/115

I modified the image-type-header-regexps list so that imagemagick is used
to more more than just jpg files.


--
Kaushal Modi

On Wed, Oct 22, 2014 at 2:50 PM, Kaushal <kaushal.modi@gmail.com> wrote:

> I went deeper in the references bug posts and I found the answer in bug #
> 10112!
>
> I had to add:
>
> (add-to-list 'image-type-header-regexps '("\\`\377\330" . imagemagick))
>
> But just for my knowledge, what is "\\`\377\330" ?
>
>
>
>
> --
> Kaushal Modi
>
> On Wed, Oct 22, 2014 at 2:45 PM, Kaushal <kaushal.modi@gmail.com> wrote:
>
>> Thanks for your reply.
>>
>> I evaluated (setq image-type-header-regexps nil) and verified that it is
>> actually set to nil by doing C-h v on that variable.
>>
>> But (eq image-type 'imagemagick) is still returning nil and I am M-:
>> (image-transform-set-scale 0.1) still does nothing.
>>
>>
>>
>>
>> --
>> Kaushal Modi
>>
>> On Wed, Oct 22, 2014 at 1:52 PM, Glenn Morris <rgm@gnu.org> wrote:
>>
>>>
>>> This message was over 1 MB. Please compress attachments in future.
>>> No need to resend this one, since interested people can fetch the
>>> attachment
>>> from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18797#5 .
>>> (But I think it has no relevance anyway.)
>>>
>>> Kaushal wrote:
>>>
>>> > I have compiled emacs with Imagemagick (the config.log file is
>>> attached).
>>> >
>>> > But "M-x image-transform-set-scale" is not working for me. The image
>>> scale
>>> > stays the same when I set the scale to 0.5. I tested it with bot png
>>> and
>>> > jpg images.
>>> >
>>> > But the eimp package is working fine (which uses mogrify from
>>> Imagemagick).
>>> >
>>> > When an image is open in a buffer, evaluating "(eq image-type
>>> > 'imagemagick)" returns "nil".
>>>
>>> Right, so it's not an ImageMagick image, so you can't transform it.
>>> Emacs uses libjpeg for jpgs by default.
>>> Try testing it on a format that Emacs does't support otherwise, eg bmp.
>>> You have to force the images to be created with type imagemagick to be
>>> able to scale them. This remains poorly documented IMO;
>>> http://debbugs.gnu.org/10746
>>>
>>> > What am I missing in enabling the imagemagick detection for functions
>>> like
>>> > image-transform-set-scale?
>>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 5952 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick
  2014-10-22 20:19       ` Kaushal
@ 2014-10-22 20:30         ` Kaushal
  2019-09-24 17:03           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Kaushal @ 2014-10-22 20:30 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 18797

[-- Attachment #1: Type: text/plain, Size: 2703 bytes --]

The drawback of tweaking the image-type-header-regexps is that inline
images stop working in org-mode.
So is there a way for org-mode to render the inline images using
imagemagick?

Thanks.


--
Kaushal Modi

On Wed, Oct 22, 2014 at 4:19 PM, Kaushal <kaushal.modi@gmail.com> wrote:

> I have posted a complete solution of what worked for me on Emacs SE:
> http://emacs.stackexchange.com/a/2458/115
>
> I modified the image-type-header-regexps list so that imagemagick is used
> to more more than just jpg files.
>
>
> --
> Kaushal Modi
>
> On Wed, Oct 22, 2014 at 2:50 PM, Kaushal <kaushal.modi@gmail.com> wrote:
>
>> I went deeper in the references bug posts and I found the answer in bug #
>> 10112!
>>
>> I had to add:
>>
>> (add-to-list 'image-type-header-regexps '("\\`\377\330" . imagemagick))
>>
>> But just for my knowledge, what is "\\`\377\330" ?
>>
>>
>>
>>
>> --
>> Kaushal Modi
>>
>> On Wed, Oct 22, 2014 at 2:45 PM, Kaushal <kaushal.modi@gmail.com> wrote:
>>
>>> Thanks for your reply.
>>>
>>> I evaluated (setq image-type-header-regexps nil) and verified that it is
>>> actually set to nil by doing C-h v on that variable.
>>>
>>> But (eq image-type 'imagemagick) is still returning nil and I am M-:
>>> (image-transform-set-scale 0.1) still does nothing.
>>>
>>>
>>>
>>>
>>> --
>>> Kaushal Modi
>>>
>>> On Wed, Oct 22, 2014 at 1:52 PM, Glenn Morris <rgm@gnu.org> wrote:
>>>
>>>>
>>>> This message was over 1 MB. Please compress attachments in future.
>>>> No need to resend this one, since interested people can fetch the
>>>> attachment
>>>> from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18797#5 .
>>>> (But I think it has no relevance anyway.)
>>>>
>>>> Kaushal wrote:
>>>>
>>>> > I have compiled emacs with Imagemagick (the config.log file is
>>>> attached).
>>>> >
>>>> > But "M-x image-transform-set-scale" is not working for me. The image
>>>> scale
>>>> > stays the same when I set the scale to 0.5. I tested it with bot png
>>>> and
>>>> > jpg images.
>>>> >
>>>> > But the eimp package is working fine (which uses mogrify from
>>>> Imagemagick).
>>>> >
>>>> > When an image is open in a buffer, evaluating "(eq image-type
>>>> > 'imagemagick)" returns "nil".
>>>>
>>>> Right, so it's not an ImageMagick image, so you can't transform it.
>>>> Emacs uses libjpeg for jpgs by default.
>>>> Try testing it on a format that Emacs does't support otherwise, eg bmp.
>>>> You have to force the images to be created with type imagemagick to be
>>>> able to scale them. This remains poorly documented IMO;
>>>> http://debbugs.gnu.org/10746
>>>>
>>>> > What am I missing in enabling the imagemagick detection for functions
>>>> like
>>>> > image-transform-set-scale?
>>>>
>>>
>>>
>>
>

[-- Attachment #2: Type: text/html, Size: 7031 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick
  2014-10-22 20:30         ` Kaushal
@ 2019-09-24 17:03           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-09-24 17:03 UTC (permalink / raw)
  To: Kaushal; +Cc: 18797

Kaushal <kaushal.modi@gmail.com> writes:

> The drawback of tweaking the image-type-header-regexps is that inline images
> stop working in org-mode.
> So is there a way for org-mode to render the inline images using imagemagick?

Emacs has native image transforms now, so I think this isn't relevant
any more, and I'm closing this bug report.

If you disagree (and this is something that should receive attention),
please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-24 17:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAFyQvY1Vh6US2Nnqk8=YqLNDk3qp5naJEutpMLgy47V==Zug=w@mail.gmail.com>
2014-10-22 17:52 ` bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick Glenn Morris
2014-10-22 18:45   ` Kaushal
2014-10-22 18:50     ` Kaushal
2014-10-22 20:19       ` Kaushal
2014-10-22 20:30         ` Kaushal
2019-09-24 17:03           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.