using base64 data

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
fmw42
Posts: 26057
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: using base64 data

Post by fmw42 »

I cannot get inline:@mydata syntax to work either.

Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: using base64 data

Post by Bonzo »

After spending hours trying this I give up and will use GD.

Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: using base64 data

Post 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/

Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: using base64 data

Post 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?

User avatar
magick
Site Admin
Posts: 11150
Joined: 2003-05-31T11:32:55-07:00

Re: using base64 data

Post 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

User avatar
fmw42
Posts: 26057
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: using base64 data

Post 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.

User avatar
magick
Site Admin
Posts: 11150
Joined: 2003-05-31T11:32:55-07:00

Re: using base64 data

Post by magick »

We found a memory bug in the inline coder. With the patch we tried converting images up to 5000x5000 without complaint.

Post Reply