ImageMagick

Compress PDF after manipulation

笑着哭i 提交于 2021-01-28 18:22:40
问题 I have the following problem: I am receiving various scanned PDF files from a Kyocera Scanner Device. I have to automatically manipulate these PDF Files in order to: Delete the colors from textmarkers Convert the PDF to grayscale Put it in our DMS I am using a Bash-Script to do the job. For deleting the textmarker colors and converting to grayscale I use Imagemagick: convert -density 150 INPUT.pdf \ -channel rgba \ -alpha set \ -fuzz 15% \ -fill white \ -opaque 'rgb(255,200,195)' \ -opaque

How to save a high resolution image with magick in R?

孤者浪人 提交于 2021-01-28 14:01:01
问题 I would like to create a high resolution “montage” of 3 by 3 using the magick package. library(magick) #> Linking to ImageMagick 6.9.7.4 #> Enabled features: fontconfig, freetype, fftw, lcms, pango, x11 #> Disabled features: cairo, ghostscript, rsvg, webp # Read the image and resize it frink <- image_read("https://jeroen.github.io/images/frink.png") frink <- image_resize(frink, "100x") # Create 1 column with 3 rows col <- image_append(rep(frink, 3), stack = TRUE) # "Combine" 3 columns i <-

acrobat reduced size pdf with gs/im/other?

我只是一个虾纸丫 提交于 2021-01-28 13:40:10
问题 In Acrobat 11 Pro, I can do File > Save As Other > Reduced Size PDF (setting as Acrobat 10 viewer or later), which cut a PDF to about 40% and looks exactly the same. I am wondering how I can achieve the same result with an open source tool like ghost script, image magick, or some adobe tools on a linux server via CL or PHP. 回答1: gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf This works pretty well to reduce

Can't fit text to image with ImageMagick

帅比萌擦擦* 提交于 2021-01-28 13:16:26
问题 I need to fit my text to image. My image have different sizes so i can't set constant pointsize. My command looks something like this convert -fill white -font Winter Calligraphy -size `${options.width}x${options.height}` label: KJHGFD test.gif on output you can see cropped part on top of picture. Output: I have problem only with this fonts, other fonts works great. I tried to add white border on top. Unfortunately, this only moved the damaged text to bottom. I can't change area size. Text

How to use the first image sequence in a multiple cropping process in ImageMagick

吃可爱长大的小学妹 提交于 2021-01-28 12:20:24
问题 I want resize, crop and concatenate really many images. I don't want to write the intermediate results to disk, just the final result only. My script is : montage -mode concatenate \ \( test.jpg -thumbnail "150x100>" -background white -gravity center -extent 150x100 -page 150x100+0+0 \) \ \( -clone 0 -crop 23x16+80+0 -background white -extent 23x16 \) \ \( -clone 0 -crop 23x16+16+87 -background white -extent 23x16 \) \ ... -delete 0 -quality 100% thumb.jpg I got always the following error:

Resize image to exact size by maintaining aspect ratio nodejs

你。 提交于 2021-01-28 09:21:00
问题 I want to resize image to an exact size by maintaining aspect ratio and filling the empty space with transparency using nodejs. I am able to do it using canvas. But due to some server os issues I can not use canvas. I tried with imageMagick and gm. But couldn't find any option like these. Please show me a way to do this. Thanks in advance. 回答1: In ImageMagick, you can resize and fill to the exact size by convert image -resize WxH -background none -gravity center -extent WxH output Input: Here

exec() function within Laravel works wrong, in tinker and console properly

懵懂的女人 提交于 2021-01-28 08:00:48
问题 I have a weird problem with exec function within the Laravel app. Using imagemagick library I have to combine two pdf files - the same shell command works properly in terminal, exec() with this command in tinker works properly too. However, when called from job or controller within the Laravel app it looks like it is not seeing the original file at all. What can be the reason? All files are stored in generated storage subfolders. works properly in tinker works properly in terminal works

r piping image_annotate doesn't work as expected

你说的曾经没有我的故事 提交于 2021-01-28 06:13:03
问题 I am trying to using magick to create an animated gif from a bunch of images. It works just fine but I wanted to annotate text (basically the file name) to each image before creating the gif - and that doesn't work. I can't find the cause of the error (below) - not sure if it is the piping notation, the map function, or something else. library(purrr) library(magick) #set working directory with a couple of png's #This works: image_read("image1.png") %>% image_annotate("Text") #and this works

ImageMagick: custom rank filter? Like erode or dilate or median but a different rank, e.g. a 'percentile' filter?

假如想象 提交于 2021-01-28 05:40:38
问题 When applying a rank filter with ImageMagick such as erode or delate or median, it takes the minimum ( erode ) or maximum ( dilate ) or middle ( median ) value of all pixels within a certain radius or custom shape around each source pixel. Is it also possible to take a custom rank of the surrounding pixel values? For example when using a 5x5 square, with the erode or dilate or median filters, respectively the lowest, highest, of middle value of the 25 pixels surrounding each pixel is taken.

Opening AppImage does nothing. What can I do?

瘦欲@ 提交于 2021-01-28 05:30:24
问题 I am a complete newbie to Linux and trying to open an AppImage called Magick which is an Imagemagick application. I tried right clicking on the AppImage and checked "run file as an executable" option but that didn't work. Another thing that I tried is running this command, chmod a+x magick.AppImage This gives me an error, chmod: cannot access 'magick.AppImage': No such file or directory I have also tried running the file by navigating into the folder that contains the file and opening up the