Quantcast
Viewing all articles
Browse latest Browse all 15

AWS Lambda with IM7

Hi,

I am using ImageMagick in a AWS Lambda to crop png to tiles with that command:

Code:

/opt/bin/magick convert /tmp/1571383180912/1571383180912_300dpi.png -monitor -crop 512x512 -set filename:tile %[fx:page.x/512]_%[fx:page.y/512] +repage +adjoin "/tmp/1571383180912/1571383180912_300dpi/tile-300-%[filename:tile].png"
Everything is working so far, I just have issues with huge png (I have a 8mo file, 26 000*10 000 pixels)
I am getting the following error :

Code:

convert: unable to write pixel cache '/tmp/magick-24phDuETFQt7OM': No space left on device @ error/cache.c/WritePixelCachePixels/5823.convert: no images defined `/tmp/1571383180912/1571383180912_300dpi/tile-300-%[filename:tile].png' @ error/convert.c/ConvertImageCommand/3300.
I pretty much already know why : Lambda have only 512mb space available on /tmp file, and /tmp is the only FS we get the access to.

My question is, can I remove the disk pixel cache and only use memory cache ? (I can get up to 3gb)
Time is not really an issue, I just want it to get done.

Thank you for your help.

Statistics: Posted by malinlesinge — 2019-10-18T01:48:16-07:00 — Replies 2 — Views 63505



Viewing all articles
Browse latest Browse all 15

Trending Articles