Page 2 of 2

Re: using base64 data

Posted: 2015-01-25T17:54:21-07:00
by fmw42
I cannot get inline:@mydata syntax to work either.

Re: using base64 data

Posted: 2015-01-26T14:35:25-07:00
by Bonzo
After spending hours trying this I give up and will use GD.

Re: using base64 data

Posted: 2015-01-27T13:55:52-07:00
by Bonzo
I have had another go at this even though I said I would not!

Putting Anthony's example code in a file works using Windows command line. But using one of my files which is considerably larger even though it starts the same with data:, ends up with a corrupt image error. Using a @ in the code produces a unable to open image error.

Code: Select all

convert inline:C:\inline.txt C:\WAHOO.png
So I assume part of my problem is caused by php in some way but I am unsure if Imagemagick can work with a large file which seems strange as it can read large images in; why not large data files?

EDIT: One thing I noticed is my file is escaping the /with \
data:,\/9j\/4AAQSkZJRgABAQECVwJXAAD\/
So I removed all the \ and it still did not work
data:,/9j/4AAQSkZJRgABAQECVwJXAAD/

Re: using base64 data

Posted: 2015-02-10T14:48:23-07:00
by Bonzo
I have tried the 6.9.0-5 version and I can get it to work from a file inline but only on small files. Is there still a limit set somewhere; as I thought reading from a file had no size restrictions?

Re: using base64 data

Posted: 2015-02-10T15:48:56-07:00
by magick
There is a 4096 character limit to inline data (8192 in IMv7)-- unless its read from a file:
  • convert logo: inline:logo.txt
    identify -verbose inline:logo.txt

Re: using base64 data

Posted: 2015-02-10T16:04:46-07:00
by fmw42
magick wrote:There is a 4096 character limit to inline data (8192 in IMv7)-- unless its read from a file:
  • convert logo: inline:logo.txt
    identify -verbose inline:logo.txt

I believe that Bonzo is saying he is finding length limits when using a file.

Re: using base64 data

Posted: 2015-02-10T16:14:28-07:00
by magick
We found a memory bug in the inline coder. With the patch we tried converting images up to 5000x5000 without complaint.