From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28677 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Newsgroups: gmane.text.pandoc Subject: Re: tiff sizing problems in md to docx Date: Wed, 23 Jun 2021 09:03:14 -0700 (PDT) Message-ID: References: <131ae7e2-cb6a-47a0-a2b6-c724cfba584an@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1434_1062772166.1624464194382" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20485"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCX7HCFDXYLRBQ5WZWDAMGQEBCIFKIY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 23 18:03:18 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f63.google.com ([209.85.210.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lw5LR-0005C8-Pn for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 23 Jun 2021 18:03:17 +0200 Original-Received: by mail-ot1-f63.google.com with SMTP id y59-20020a9d22c10000b0290451891192f0sf1554913ota.1 for ; Wed, 23 Jun 2021 09:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=A1MXMoeyO2MXkE8gYXWvhH1cfKZxdG2pZkf0wn3dt9I=; b=SKi8Ev9GqGhBgQ+b+ky9b1pyrdCqoPuXdI0C97v7bMyUQAFNEgBj1OneoAej1yn+dl xCFQ8GA54D6NphvCzKRsSRqWKkUdLx99oyDGE7W9GWwmgyoBXcIROirkG7vdVEh15DKP +06ZL3OgpkcKSn4ea2iyG8wajVQUDUJ2ZdmcLiBBl7F1A1tIlWCTgr4vHj55M2KlLRYO B2gH14tuhGj4kRawnuQbSTAKUxjLJ4B/j+/oDbnkM1/nWYNTGWc/Y34KTeb5237kVVX5 JnRhByi7XKK4TZDfuK7w5D3HMC6vVe0QKOg6GpgAVjoZWyqS7zUKMPkONN8RZycK6ckq Wd5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=A1MXMoeyO2MXkE8gYXWvhH1cfKZxdG2pZkf0wn3dt9I=; b=AWw+APuqotxOOPaXRVLVVlYFrUxDyIKP1ec/dpcvsIhJUdlACnmioLx82jZ5u4+JAz zHMkWMIXY37gajxgg+tM3+WwBObL8M/7b8AIbKE612fZbyNYNWf4OD7xiexuDgyMwEGp tbMFCG4o+2x5KayQ8PhSy2fU9axAEPS29fW+mjwbDZYjtedd8ixTQ3Uojdknh/vuBHOm jBrFpXVBqH5tPoKz3WIZxJEkbEnry87bj4Q/gOd6fHV2bl85U+RfDjZH6O9YsbNspVv0 CNExbn46JUWnxsgAKkkAm/d6Nv6c41R4kMiq1jxIol2Mwbdb1mTYMco0pUkCRzkEmDNx V7CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=A1MXMoeyO2MXkE8gYXWvhH1cfKZxdG2pZkf0wn3dt9I=; b=hSciHVl+h8aduGQCTN2bX5B1f7oUE34UcFMhR92SlC+miCVbiTfR3t73dmKVdYVsFs 2c0rg3LRgw+KE7c8LzlFzop8blYn5mRSqjWKtQ4/IFCwtwRVzyNi/q1ypN7x2YdvnZFC EOmVt3ve3wueHeQTX/WUNeVzZCOfqHLinGDN8zs5n/vPWjj15tA4fBi5OI3/NARE2SCl ENIONKHxSX+XiuHRhjqc32udZjG3MueoM2xPdJBsl74ZMTlS3FOLJ+aS041N3WcRnnyi Q926N2D7mX1ipsRhp0LYjjgEaNmfKifpQKtnZaBE+HFWlrN7jYbSAkuVnqsjCOzYCeuo 1g8g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530ACuxSvehUC2PdujIHfdLOF8jMjb6g+v+d7e32jRrKEZbFYOdq lwVdXTP0fHWNjORNVTYtDmc= X-Google-Smtp-Source: ABdhPJwGNdLSz0/K/82raKBX1E61Ml55JqYrnVvzdH0C7ePg2ta1P48jgjr5cCDYSVN+TNAhfuiqyQ== X-Received: by 2002:a9d:550a:: with SMTP id l10mr556555oth.125.1624464196824; Wed, 23 Jun 2021 09:03:16 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:cf0e:: with SMTP id f14ls1130835oig.5.gmail; Wed, 23 Jun 2021 09:03:15 -0700 (PDT) X-Received: by 2002:aca:d5cd:: with SMTP id m196mr3834210oig.138.1624464194966; Wed, 23 Jun 2021 09:03:14 -0700 (PDT) In-Reply-To: <131ae7e2-cb6a-47a0-a2b6-c724cfba584an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jmuccigr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:28677 Archived-At: ------=_Part_1434_1062772166.1624464194382 Content-Type: multipart/alternative; boundary="----=_Part_1435_748925180.1624464194382" ------=_Part_1435_748925180.1624464194382 Content-Type: text/plain; charset="UTF-8" Any help on this one? Thanks. On Saturday, 12 June 2021 at 15:34:25 UTC-4 jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > In working on a document with tiff images in it, I ran into some trouble. > Basically the proportions of the tiff get changed in the output docx file. > (Caveat: I don't have Word on my computer, but the macOS quicklook, Pages, > LibreOffice, Google doc conversation, and some random on-line file > converter all show the problem, so I take it that it's real.) I attach one > of the problematic docx files. > > It showed up for me like this: > > An included tiff image had the wrong proportions in the output docx. The > width was scaled down, so the image looked horizontally squished. I attach > a screen shot where the first image is a jpeg version and the second a > tiff. In that image, the jpeg has the dimensions of 1050x476, for a ratio > of 2.20, which matches the original. The tiff is 750x500 for a ratio of > 1.50 and the pixel height isn't the same as the jpeg either, so that's > getting changed, too. > > If I look at the document.xml in the unzipped version of the > pandoc-generated docx, I see this, which provides a 1.5 ratio of cx to cy: > > ``` > > > > > ``` > > If I use image magic's format command, the original tiff has the following > relevant (I think) properties: > > - Geometry: 1758x798+0+0 > - Resolution: 300x300 > - Print size: 5.86x2.66 > - Units: PixelsPerInch > > I don't see anything else that gets me to that 1.5 ratio. Note that both > image files in the unzipped docx seem identical to the originals, so > nothing is going on there. > > 2. In doing some testing, I came across a similar problem. I used > imagemagick to create two identical images, one jpeg and the other tiff. > Then I put them into a docx via pandoc: > > ``` > > magick rose: -format jpeg -resize 600% -colorspace gray -units > pixelsperinch -density 300 rose.jpeg > > magick rose: -format tiff -resize 600% -colorspace gray -units > pixelsperinch -density 300 rose.tiff > > pandoc -t docx -o rose.docx > Hello. > > ![jpeg](./rose.jpeg) > > Goodbye > > ![tiff](rose.tiff) > > ``` > In this case the output images are very obviously differently sized, and > the second once again has an aspect ratio of 1.5 (the original is 1.52, so > the two images look identically proportioned to the eye). It also has the > identical pixel size as the tiff in the other example. I attach this file. > > If I output to odt, I get the following warning and the output file again > has a wrongly ratio'd tiff (not shown, but it's square): > > `[WARNING] Could not determine image size for rose.tiff: could not > determine image type` > > So something appears to be going on with reading tiffs. > > [image: Screen Shot 2021-06-12 at 14.33.55.png] > [image: Screen Shot 2021-06-12 at 14.44.57.png] > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ad6c9227-764d-4a81-9242-efdbbef46916n%40googlegroups.com. ------=_Part_1435_748925180.1624464194382 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Any help on this one?

Thanks.

On Saturday, 12 June 2= 021 at 15:34:25 UTC-4 jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
In working on a document with tiff image= s in it, I ran into some trouble. Basically the proportions of the tiff get= changed in the output docx file. (Caveat: I don't have Word on my comp= uter, but the macOS quicklook, Pages, LibreOffice, Google doc conversation,= and some random on-line file converter all show the problem, so I take it = that it's real.) I attach one of the problematic docx files.

It showed up for me like this:

An include= d tiff image had the wrong proportions in the output docx. The width was sc= aled down, so the image looked horizontally squished. I attach a screen sho= t where the first image is a jpeg version and the second a tiff. In that im= age, the jpeg has the dimensions of 1050x476, for a ratio of 2.20, which ma= tches the original. The tiff is 750x500 for a ratio of 1.50 and the pixel h= eight isn't the same as the jpeg either, so that's getting changed,= too.

If I look at the document.xml in the unzippe= d version of the pandoc-generated docx, I see this, which provides a 1.5 ra= tio of cx to cy:

```
<a:xfrm>
=C2=A0 =C2=A0 <a:off x=3D"0" y=3D"0"/>=
=C2=A0 =C2=A0 <a:ext cx=3D"3810000" cy=3D"2540= 000"/>
</a:xfrm>
```

=
If I use image magic's format command, the original tiff has= the following relevant (I think) properties:

- =C2=A0Geometry: 1758x798+0+0
- =C2=A0Resolution: 300x300
=
- =C2=A0Print size: 5.86x2.66
- =C2=A0Units: PixelsPerInch

I don't see anything else that gets me to= that 1.5 ratio. Note that both image files in the unzipped docx seem ident= ical to the originals, so nothing is going on there.

2. In doing some testing, I came across a similar problem. I used imagem= agick to create two identical images, one jpeg and the other tiff. Then I p= ut them into a docx via pandoc:

```
> magick rose: -format jpeg -resize 600% -colorspace gray -units pixels= perinch -density 300 rose.jpeg
> magick rose: -format tiff -re= size 600% -colorspace gray -units pixelsperinch -density 300 rose.tiff
> pandoc -t docx -o rose.docx
Hello.

![jpeg](./rose.jpeg)

Goodbye

<= /div>
![tiff](rose.tiff)

```
I= n this case the output images are very obviously differently sized, and the= second once again has an aspect ratio of 1.5 (the original is 1.52, so the= two images look identically proportioned to the eye). It also has the iden= tical pixel size as the tiff in the other example. I attach this file.

If I output to odt, I get the following warning and th= e output file again has a wrongly ratio'd tiff (not shown, but it's= square):

`[WARNING] Could not determine image siz= e for rose.tiff: could not determine image type`

So something appears to be going on with reading tiffs.

3D"Screen
3D"Screen

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/ad6c9227-764d-4a81-9242-efdbbef46916n%40googlegroups.= com.
------=_Part_1435_748925180.1624464194382-- ------=_Part_1434_1062772166.1624464194382--