Search found 15 matches

by AVoeee
2018-02-09T03:16:16-07:00
Forum: Users
Topic: Text error when converting pdf file (letters become rectangles)
Replies: 3
Views: 1780

Re: Text error when converting pdf file (letters become rectangles)

Hello, I found a workaround for the problem described above. I use poppler to convert the PDF to some image format and then process this new image with IM7. Here is the bash code: file="some.pdf" tmp_type="png" tmp_file="/tmp/pdftoppm_some" # note that there is no filename extension result="result.j...
by AVoeee
2018-02-06T14:57:19-07:00
Forum: Users
Topic: Text error when converting pdf file (letters become rectangles)
Replies: 3
Views: 1780

Re: Text error when converting pdf file (letters become rectangles)

Hello, thanks for the reply! It is probably in a font which is neither embedded on the PDF nor installed on your computer. I had thought of something similar, but the file is displayed correctly in a PDF viewer on the same computer. I ran "pdffonts" on said PDF, with the following result: pdffonts c...
by AVoeee
2018-02-06T07:41:02-07:00
Forum: Users
Topic: Text error when converting pdf file (letters become rectangles)
Replies: 3
Views: 1780

Text error when converting pdf file (letters become rectangles)

Hello, when I convert a PDF file, a specific line becomes this . The rest of the text is unaffected. This behaviour does not occur with any other PDF file (so far). The line does not contain special characters or similar. It says "Senior Vice President, Oracle University". Unfortunately, I can not p...
by AVoeee
2018-02-06T01:14:23-07:00
Forum: Users
Topic: Is it possible to dynamically calculate the required rotation angle while processing an image?
Replies: 14
Views: 5107

Re: Is it possible to dynamically calculate the required rotation angle while processing an image?

Hello, @fmw42: Sorry, I had overlooked that it was not made clear which approach I actually use. I'm using Geemack's approach from this thread. So if you are making a JPG output, then you must flatten your processing over some background color or image, otherwise the JPG will replace any transparenc...
by AVoeee
2018-02-05T13:37:20-07:00
Forum: Users
Topic: Is it possible to dynamically calculate the required rotation angle while processing an image?
Replies: 14
Views: 5107

Re: Is it possible to dynamically calculate the required rotation angle while processing an image?

Hello, I have an additional question and I'm unsure if I should open a new thread. When I convert images which have a transparent background to jpgs, the background turns black. (As can be seen here ). That seems to be a very common problem and I have also found some approaches and explanations in t...
by AVoeee
2018-02-04T13:58:07-07:00
Forum: Users
Topic: Is it possible to dynamically calculate the required rotation angle while processing an image?
Replies: 14
Views: 5107

Re: Is it possible to dynamically calculate the required rotation angle while processing an image?

Hello, -rotate "%[fx:t*(atan(((u.w/u.h)-(v.w/v.h))/(1-(u.w/u.h)*(v.w/v.h)))*180/Pi)]" \ The next line uses the formula you've written to rotate just the watermark image. That happens because I multiplied your formula by "t", which is the position of the image in the stack. The main input image is nu...
by AVoeee
2018-02-04T09:32:18-07:00
Forum: Users
Topic: Is it possible to dynamically calculate the required rotation angle while processing an image?
Replies: 14
Views: 5107

Re: Is it possible to dynamically calculate the required rotation angle while processing an image?

Hello, thanks for your reply. I tried to follow your hints and wrote this code: wmark="watermark.png" file="some.pdf" result="result.jpg" rotation="%[fx: ratioUI=u.w/u.h; ratioWM=v.w/v.h; atan((ratioUI-ratioWM) / (1-ratioUI * ratioWM)) * 180 / Pi]" magick -background none -density 300 "$file" \ -bor...
by AVoeee
2018-02-04T03:03:26-07:00
Forum: Users
Topic: Is it possible to dynamically calculate the required rotation angle while processing an image?
Replies: 14
Views: 5107

Re: Is it possible to dynamically calculate the required rotation angle while processing an image?

Hello, I have now switched to IM7. I am using ImageMagick 7.0.7-22 Q16 x86_64. However, I am still perplexed how to perform the calculation. "atan" returns angles in radians but "-rotate" needs degrees. Thanks for pointing this out. I'm now converting the radians to degrees via "* 180 / Pi". u.w and...
by AVoeee
2018-01-26T23:42:56-07:00
Forum: Users
Topic: Is it possible to dynamically calculate the required rotation angle while processing an image?
Replies: 14
Views: 5107

Re: Is it possible to dynamically calculate the required rotation angle while processing an image?

Hello,
thanks for the replies.

I will try to switch to IM7 next week.

Best regards
AFoeee
by AVoeee
2018-01-26T02:21:25-07:00
Forum: Users
Topic: Is it possible to dynamically calculate the required rotation angle while processing an image?
Replies: 14
Views: 5107

Re: Is it possible to dynamically calculate the required rotation angle while processing an image?

Hello, first of all: thanks for the reply! An answer to a similar question is at https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=33414 Unfortunately, this is my own thread. Although I am very grateful for the answers there, my current question was not answered. To briefly explain wh...
by AVoeee
2018-01-25T01:58:51-07:00
Forum: Users
Topic: Is it possible to dynamically calculate the required rotation angle while processing an image?
Replies: 14
Views: 5107

Is it possible to dynamically calculate the required rotation angle while processing an image?

Hello, I'd like to place a watermark over a number of images. Since the dimensions of these images vary, but the watermark should always have the maximal possible size at constant proportions, I have to calculate the perfect angle for the resizing. (It should look like that . Not like that .) I use ...
by AVoeee
2018-01-24T03:09:16-07:00
Forum: Users
Topic: How to calculate the rotation angle for an overlying image, so that it just fits diagonally iniside an underlying image?
Replies: 4
Views: 2033

Re: How to calculate the rotation angle for an overlying image, so that it just fits diagonally iniside an underlying im

Hello, @GeeMack: I'm sorry, I've overlooked that you had revised your post. Thanks for the answer! The angle i was looking for can apparently be calculated by: ratio1 = pic1_width / pic1_height ratio2 = pic2_width / pic2_height angle = atan ((ratio1 - ratio2) / (1 - ratio1 * ratio2)) A complete expl...
by AVoeee
2018-01-23T02:55:29-07:00
Forum: Users
Topic: How to calculate the rotation angle for an overlying image, so that it just fits diagonally iniside an underlying image?
Replies: 4
Views: 2033

How to calculate the rotation angle for an overlying image, so that it just fits diagonally iniside an underlying image?

Hello, I'd like to place a watermark diagonally over a number of pictures. The width and length of these pictures differ and some might even be smaller than the watermark itself. This will be used inside a script, in which the user can choose from different options like "horizontal", "vertical", "di...
by AVoeee
2018-01-14T13:47:23-07:00
Forum: Users
Topic: Is it possible to access in a Image Stack (parentheses) the dimensions of an image outside of the Image Stack?
Replies: 3
Views: 2123

Is it possible to access in a Image Stack (parentheses) the dimensions of an image outside of the Image Stack?

Hello, is there a way to access the dimensions of an image which is outside of an Image Stack while you're inside of an Image Stack? Here is my specific case: I want to place a picture over another picture. The overhead image may be rotated, but it should always scaled so that it has the maximum pos...