* Re: tiff sizing problems in md to docx
[not found] ` <131ae7e2-cb6a-47a0-a2b6-c724cfba584an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-06-23 16:03 ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[not found] ` <ad6c9227-764d-4a81-9242-efdbbef46916n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-07-29 8:42 ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
1 sibling, 1 reply; 4+ messages in thread
From: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-06-23 16:03 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 3346 bytes --]
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:
>
> ```
> <a:xfrm>
> <a:off x="0" y="0"/>
> <a:ext cx="3810000" cy="2540000"/>
> </a:xfrm>
> ```
>
> 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.
[-- Attachment #1.2: Type: text/html, Size: 4777 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: tiff sizing problems in md to docx
[not found] ` <ad6c9227-764d-4a81-9242-efdbbef46916n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-06-23 17:27 ` John MacFarlane
[not found] ` <m21r8so5jp.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2021-06-23 17:27 UTC (permalink / raw)
To: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss
Why don't you submit an issue to the tracker?
I note that Text.Pandoc.ImageSize doesn't contain a type for
Tiff, and also that the default for imagesize has a 1.5 aspect
ratio...so my guess is that we're just using defaults there.
I think it will be a trivial fix to support tiff properly!
"jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jmuccigr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> 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:
>>
>> ```
>> <a:xfrm>
>> <a:off x="0" y="0"/>
>> <a:ext cx="3810000" cy="2540000"/>
>> </a:xfrm>
>> ```
>>
>> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: tiff sizing problems in md to docx
[not found] ` <m21r8so5jp.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
@ 2021-06-23 17:49 ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
0 siblings, 0 replies; 4+ messages in thread
From: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-06-23 17:49 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 4608 bytes --]
Submitted. #7405 <https://github.com/jgm/pandoc/issues/7405>
On Wednesday, 23 June 2021 at 13:27:23 UTC-4 John MacFarlane wrote:
>
> Why don't you submit an issue to the tracker?
> I note that Text.Pandoc.ImageSize doesn't contain a type for
> Tiff, and also that the default for imagesize has a 1.5 aspect
> ratio...so my guess is that we're just using defaults there.
>
> I think it will be a trivial fix to support tiff properly!
>
> "jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > 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:
> >>
> >> ```
> >> <a:xfrm>
> >> <a:off x="0" y="0"/>
> >> <a:ext cx="3810000" cy="2540000"/>
> >> </a:xfrm>
> >> ```
> >>
> >> 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-discus...-/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
> .
>
--
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/7584ca74-f108-4295-96c5-0160dd883687n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 6539 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: tiff sizing problems in md to docx
[not found] ` <131ae7e2-cb6a-47a0-a2b6-c724cfba584an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-06-23 16:03 ` tiff sizing problems in md to docx jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
@ 2021-07-29 8:42 ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
1 sibling, 0 replies; 4+ messages in thread
From: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-07-29 8:42 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 3355 bytes --]
For posterity, this is fixed in 2.14.1.
On Saturday, 12 June 2021 at 21:34:25 UTC+2 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:
>
> ```
> <a:xfrm>
> <a:off x="0" y="0"/>
> <a:ext cx="3810000" cy="2540000"/>
> </a:xfrm>
> ```
>
> 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/7da0fa52-d62f-46b1-88e4-a9865f4ea861n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 4754 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-29 8:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <131ae7e2-cb6a-47a0-a2b6-c724cfba584an@googlegroups.com>
[not found] ` <131ae7e2-cb6a-47a0-a2b6-c724cfba584an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-06-23 16:03 ` tiff sizing problems in md to docx jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[not found] ` <ad6c9227-764d-4a81-9242-efdbbef46916n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-06-23 17:27 ` John MacFarlane
[not found] ` <m21r8so5jp.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-06-23 17:49 ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2021-07-29 8:42 ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).