How to convert bigger base64 files?

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?".
Post Reply
yhuynh
Posts: 17
Joined: 2017-11-20T03:29:58-07:00
Authentication code: 1152

How to convert bigger base64 files?

Post by yhuynh » 2017-11-20T03:39:22-07:00

Hello, I am using this command:
$convert image.svg image.png


Inthe svg file there are some base64 images:
<image xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAADcCA...." x="-840.555" y="-370.5" style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" width="1681.11" height="741" preserveAspectRatio="none"></image>
</g>

I noticed if the base64 file is not too big, the conversion is ok but in my case the base64 was an image of 3888 x ..., I wanted to know if there is a way to raise the allowed size. Thank you in advance.

My OS: Debian 8

Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-07-15 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib

snibgo
Posts: 12011
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to convert bigger base64 files?

Post by snibgo » 2017-11-20T05:11:46-07:00

Do you get an error message? What happens?

What delegate reads the SVG? The delegate is either Inkscape, RSVG or MVG. If you are not using Inkscape, I suggest you try it.

Can Inkscape, run by itself without ImageMagick, process the SVG?
snibgo's IM pages: im.snibgo.com

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

Re: How to convert bigger base64 files?

Post by Bonzo » 2017-11-20T05:42:26-07:00

I had problems with large base64 images as well and the thread is here: https://www.imagemagick.org/discourse-s ... 64#p119516

Basically use the inline option or read from a text file. In my case I could still not get either to work.
We found a memory bug in the inline coder. With the patch we tried converting images up to 5000x5000 without complaint.
Not sure which version this was but from memory it still did not work for me or you by the looks of things.

yhuynh
Posts: 17
Joined: 2017-11-20T03:29:58-07:00
Authentication code: 1152

Re: How to convert bigger base64 files?

Post by yhuynh » 2017-11-20T06:22:35-07:00

Hello,
a little bit of history:
We used to have a Centos 6.7, and have Imagemagick :
Version: ImageMagick 6.7.2-7 2015-07-23 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
RSVG 2.26.0 versus now on my Debian RSVG 2.40 (maybe something to do with version change?)


this was set before I arrive at the company, we then changed linux server with a more recent version of Imagemagick.

The SVG file embed some base64 images, when I encode there is no error message, but I noticed that i was quick to terminate, one second. On the old server that works, it take about 5-7 seconds. This make me think there is an early abortion.

We use no software, we user convert directly in shell commande line.

$convert file.svg image.png

I don't know what is the size limit that cause trouble. If there is a verbose or debug mode what is the syntaxe? i am new to Imagemagick.

The SVG file is programmatically generated by a program called PDC (a Magento plugin)


=================================
Update : Here the result when I run

$convert -debug All toto.svg toto.png

Code: Select all

 2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Configure convert[12098]: utility.c/ExpandFilenames/945/Configure
  Command line: convert {-debug} {All} {toto.svg} {toto.png}
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/share/ImageMagick-6/coder.xml"
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9//config-Q16/coder.xml"
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/etc/ImageMagick-6/coder.xml"
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6/coder.xml"
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/root/.config/ImageMagick/coder.xml"
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/root/.magick/coder.xml"
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Configure convert[12098]: coder.c/LoadCoderCache/799/Configure
  Loading coder configuration file "/etc/ImageMagick-6/coder.xml" ...
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Module convert[12098]: module.c/OpenModule/1275/Module
  Searching for module "SVG" using filename "svg.la"
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Module convert[12098]: module.c/GetMagickModulePath/561/Module
  Searching for coder module file "svg.la" ...
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Module convert[12098]: module.c/OpenModule/1284/Module
  Opening module at path "/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9//modules-Q16/coders/svg.la"
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Module convert[12098]: module.c/OpenModule/1311/Module
  Method "RegisterSVGImage" in module "SVG" at address 0x7f6e703f37a0
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Module convert[12098]: module.c/OpenModule/1325/Module
  Method "UnregisterSVGImage" in module "SVG" at address 0x7f6e703f39c0
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Policy convert[12098]: policy.c/IsRightsAuthorized/574/Policy
  Domain: Path; rights=Read; pattern="toto.svg" ...
2017-11-20T14:36:20+01:00 0:00.000 0.000u 6.8.9 Blob convert[12098]: blob.c/OpenBlob/2601/Blob
    read 3 magic header bytes
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Cache convert[12098]: cache.c/DestroyPixelCache/942/Cache
  destroy
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/share/ImageMagick-6/magic.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9//config-Q16/magic.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/etc/ImageMagick-6/magic.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6/magic.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/root/.config/ImageMagick/magic.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/root/.magick/magic.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: magic.c/LoadMagicCache/772/Configure
  Loading magic configure file "/etc/ImageMagick-6/magic.xml" ...
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Policy convert[12098]: policy.c/IsRightsAuthorized/574/Policy
  Domain: Coder; rights=Read; pattern="SVG" ...
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Policy convert[12098]: policy.c/IsRightsAuthorized/574/Policy
  Domain: Path; rights=Read; pattern="toto.svg" ...
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Blob convert[12098]: blob.c/OpenBlob/2601/Blob
    read 3 magic header bytes
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/share/ImageMagick-6/delegates.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9//config-Q16/delegates.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/etc/ImageMagick-6/delegates.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6/delegates.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/root/.config/ImageMagick/delegates.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: configure.c/GetConfigureOptions/679/Configure
  Searching for configure file: "/root/.magick/delegates.xml"
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Configure convert[12098]: delegate.c/LoadDelegateCache/1475/Configure
  Loading delegate configuration file "/etc/ImageMagick-6/delegates.xml" ...
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Resource convert[12098]: resource.c/AcquireUniqueFileResource/468/Resource
  ...
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Resource convert[12098]: resource.c/AcquireUniqueFileResource/509/Resource
  Acquire /tmp/magick-12098BulsB_k4vqps
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Resource convert[12098]: resource.c/AcquireUniqueFileResource/468/Resource
  ...
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Resource convert[12098]: resource.c/AcquireUniqueFileResource/509/Resource
  Acquire /tmp/magick-120986OC1kEyoqjMN
2017-11-20T14:36:20+01:00 0:00.010 0.000u 6.8.9 Policy convert[12098]: policy.c/IsRightsAuthorized/574/Policy
  Domain: Delegate; rights=Execute; pattern="inkscape" ...
2017-11-20T14:36:20+01:00 0:00.020 0.000u 6.8.9 Resource convert[12098]: resource.c/RelinquishUniqueFileResource/895/Resource
  Relinquish /tmp/magick-120986OC1kEyoqjMN
2017-11-20T14:36:20+01:00 0:00.020 0.000u 6.8.9 Resource convert[12098]: resource.c/RelinquishUniqueFileResource/895/Resource
  Relinquish /tmp/magick-12098BulsB_k4vqps
2017-11-20T14:36:20+01:00 0:00.420 0.400u 6.8.9 Resource convert[12098]: resource.c/AcquireMagickResource/279/Resource
  Area: 37.84MB/37.84MB/67.377GB
2017-11-20T14:36:20+01:00 0:00.420 0.400u 6.8.9 Resource convert[12098]: resource.c/AcquireMagickResource/279/Resource
  Memory: 37.84MB/36.09MiB/31.375GiB
2017-11-20T14:36:20+01:00 0:00.420 0.400u 6.8.9 Cache convert[12098]: cache.c/OpenPixelCache/3588/Cache
  open toto.svg[0] (Heap Memory, 3276x1444 36.09MiB)
2017-11-20T14:36:20+01:00 0:00.420 0.400u 6.8.9 Resource convert[12098]: resource.c/AcquireMagickResource/279/Resource
  Memory: 18.92MB/54.14MiB/31.375GiB
2017-11-20T14:36:20+01:00 0:00.420 0.400u 6.8.9 Resource convert[12098]: resource.c/RelinquishMagickResource/862/Resource
  Memory: 18.92MB/36.09MiB/31.375GiB
2017-11-20T14:36:20+01:00 0:00.420 0.400u 6.8.9 Resource convert[12098]: resource.c/RelinquishMagickResource/862/Resource
  Map: 18.92MB/16EiB/62.75GiB
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Resource convert[12098]: resource.c/RelinquishMagickResource/862/Resource
  Memory: 18.92MB/18.05MiB/31.375GiB
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Module convert[12098]: module.c/OpenModule/1275/Module
  Searching for module "PNG" using filename "png.la"
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Module convert[12098]: module.c/GetMagickModulePath/561/Module
  Searching for coder module file "png.la" ...
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Module convert[12098]: module.c/OpenModule/1284/Module
  Opening module at path "/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9//modules-Q16/coders/png.la"
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Module convert[12098]: module.c/OpenModule/1311/Module
  Method "RegisterPNGImage" in module "PNG" at address 0x7f6e6c6b82e0
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Module convert[12098]: module.c/OpenModule/1325/Module
  Method "UnregisterPNGImage" in module "PNG" at address 0x7f6e6c6b88c0
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Policy convert[12098]: policy.c/IsRightsAuthorized/574/Policy
  Domain: Coder; rights=Write; pattern="PNG" ...
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Coder convert[12098]: png.c/WritePNGImage/11472/Coder
  Enter WritePNGImage()
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Coder convert[12098]: png.c/WritePNGImage/12051/Coder
    Chunks to be excluded from the output png:
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/7938/Coder
    Enter WriteOnePNGImage()
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/7966/Coder
      IM version     = 6.8.9-9
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/7968/Coder
      Libpng version = 1.2.50
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/7975/Coder
      Zlib version   = 1.2.8
2017-11-20T14:36:20+01:00 0:00.560 0.550u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8148/Coder
      storage_class=DirectClass
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/LosslessReduceDepthOK/934/Coder
      Not OK to reduce PNG bit depth to 8 without loss of info
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8421/Coder
      Enter BUILD_PALETTE:
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8426/Coder
        image->columns=3276
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8428/Coder
        image->rows=1444
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8430/Coder
        image->matte=1
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8432/Coder
        image->depth=16
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8468/Coder
        image->colors=0
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8472/Coder
          (zero means unknown)
2017-11-20T14:36:20+01:00 0:00.570 0.560u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8476/Coder
        Regenerate the colormap
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8593/Coder
        Check colormap for background (65535,65535,65535)
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8619/Coder
        No room in the colormap to add background color
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8628/Coder
        image has more than 256 colors
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8829/Coder
        image->colors=0
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8853/Coder
        number_transparent     = 0
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8867/Coder
        number_opaque          > 256
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8871/Coder
        number_semitransparent = 0
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8888/Coder
        At least one pixel or the background is non-gray
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/8891/Coder
      Exit BUILD_PALETTE:
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9419/Coder
      width=3276
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9421/Coder
      height=1444
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9423/Coder
      image_matte=1
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9425/Coder
      image->depth=16
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9427/Coder
      Tentative ping_bit_depth=16
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9442/Coder
      Setting up pHYs chunk
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9469/Coder
      Set up PNG pHYs chunk: xres: 90, yres: 90, units: 0.
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9512/Coder
      Setting up bKGD chunk (1)
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9514/Coder
        background_color index is 0
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9518/Coder
      ping_bit_depth=16
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9656/Coder
    Selecting PNG colortype:
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9714/Coder
      Selected PNG colortype=6
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9750/Coder
      Number of colors: 0
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9753/Coder
      Tentative PNG bit depth: 16
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9765/Coder
      Tentative PNG color type: RGB+Alpha (6)
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9770/Coder
      image_info->type: 0
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9773/Coder
      image_depth: 16
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9776/Coder
      image->depth: 16
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/9780/Coder
      ping_bit_depth: 16
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10187/Coder
      PNG color type: RGB+Alpha (6)
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10195/Coder
    Setting up deflate compression
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10198/Coder
      Compression buffer size: 32768
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10205/Coder
      Compression mem level: 9
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10285/Coder
      Compression level:    7
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10294/Coder
    Setting up filtering
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10298/Coder
      Base filter method: ADAPTIVE
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10434/Coder
    Writing PNG header chunks
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10578/Coder
    Setting up gAMA chunk
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10606/Coder
    Setting up cHRM chunk
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10623/Coder
      Setting up bKGD chunk
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10625/Coder
        background color = (65535,65535,65535)
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10630/Coder
        index = 0, gray=65535
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10649/Coder
      Setting up pHYs chunk
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10651/Coder
        x_resolution=90
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10654/Coder
        y_resolution=90
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10657/Coder
        unit_type=0
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Policy convert[12098]: policy.c/IsRightsAuthorized/574/Policy
  Domain: Path; rights=Write; pattern="toto.png" ...
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10803/Coder
    Writing PNG image data
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/10806/Coder
      Allocating 26208 bytes of memory for pixels
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Resource convert[12098]: resource.c/AcquireMagickResource/279/Resource
  Memory: 26.2KB/18.07MiB/31.375GiB
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Resource convert[12098]: resource.c/RelinquishMagickResource/862/Resource
  Memory: 26.2KB/18.05MiB/31.375GiB
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Resource convert[12098]: resource.c/RelinquishMagickResource/862/Resource
  Map: 26.2KB/16EiB/62.75GiB
2017-11-20T14:36:20+01:00 0:00.590 0.580u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11010/Coder
      Writing row of pixels (3)
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11100/Coder
    Wrote PNG image data
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11103/Coder
      Width: 3276
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11106/Coder
      Height: 1444
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11115/Coder
      PNG bit-depth written: 16
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11124/Coder
      PNG color-type written: 6
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11127/Coder
      PNG Interlace method: 0
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11188/Coder
    Setting up text chunk
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11191/Coder
      keyword: 'date:create'
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11188/Coder
    Setting up text chunk
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11191/Coder
      keyword: 'date:modify'
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11188/Coder
    Setting up text chunk
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11191/Coder
      keyword: 'svg:base-uri'
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11207/Coder
    Writing PNG end info
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Resource convert[12098]: resource.c/RelinquishMagickResource/862/Resource
  Memory: 26.2KB/18.02MiB/31.375GiB
2017-11-20T14:36:21+01:00 0:01.230 1.220u 6.8.9 Coder convert[12098]: png.c/WriteOnePNGImage/11269/Coder
    exit WriteOnePNGImage()
2017-11-20T14:36:21+01:00 0:01.270 1.220u 6.8.9 Coder convert[12098]: png.c/WritePNGImage/12115/Coder
  exit WritePNGImage()
2017-11-20T14:36:21+01:00 0:01.270 1.220u 6.8.9 Cache convert[12098]: cache.c/DestroyPixelCache/942/Cache
  destroy toto.svg[0]
2017-11-20T14:36:21+01:00 0:01.270 1.220u 6.8.9 Resource convert[12098]: resource.c/RelinquishMagickResource/862/Resource
  Memory: 37.84MB/16EiB/31.375GiB

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

Re: How to convert bigger base64 files?

Post by Bonzo » 2017-11-20T07:47:35-07:00

The OP had already tried -debug

yhuynh
Posts: 17
Joined: 2017-11-20T03:29:58-07:00
Authentication code: 1152

Re: How to convert bigger base64 files?

Post by yhuynh » 2017-11-20T08:44:38-07:00

Okay I installed Inkscape, can convert with the simple syntax :
$inkscape original.svg --export-png=destination.png

now How do i replace :
exec("/usr/bin/convert -background none ".$file." -depth 8 ".$destfolder.$destfile.".png 2>&1");
where $file is the svg and $destfolder.$destfile.".png is the destination file?

thank you in advance

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

Re: How to convert bigger base64 files?

Post by fmw42 » 2017-11-20T11:36:23-07:00

There is a limit on the number of characters before it was fixed. So it is a version issue. See viewtopic.php?f=1&t=26918&hilit=inline+ ... 15#p119519. So it should work at about IM 6.9.0.6 or 6.9.0.7 based upon the date of the fix in that topic. Your 6.8.9.9 version is too old. You would need to upgrade.

Post Reply