[texhax] FW: Re: Using .png, .jpg, .gif
Uwe Lück
uwe.lueck at web.de
Fri Aug 7 14:56:31 CEST 2009
I am forwarding a recent CTAN announcement of an update of the bmeps
package which is mentioned in the UK TeX FAQ concerning importing graphics
with the LaTeX graphics bundle.
bmeps converts certain graphics formats into EPS (Encapsulated PostScript)
which is the only graphics format that LaTeX can read with the graphics
bundle. The announcement is more specific about what bmeps actually provides.
HTH -- Uwe.
_______________________________________________
Date: Mon, 20 Jul 2009 14:21:56 +0200 (CEST)
From: CTAN Announcements <ctan-ann at dante.de>
To: ctan-ann at dante.de
Subject: CTAN Update: bmeps
On Mon, 20 Jul 2009, Dirk Krause submitted an update to the
bmeps
package.
Bmeps is a library and a command line tool for conversion of different bitmap
graphics types to EPS. It can produce EPS levels 1, 2 and 3. Level 2 allows
the
use of run-length compression and ASCII-85-encoding instead of
ASCII-Hex-encoding, while level 3 allows the use of flate compression.
TIFF- and
PNG-alpha channels can be converted into EPS level 3 image masks. Modified
dvips
sources are included to allow image conversion directly from dvips.
Version number: 2.1.3
Location on CTAN: /support/bmeps
Summary description: Converter from PNG/JPEG/Tgb81AIFF/NetPBM to EPS
License type: other-free
Announcement text:
----------------------------------------------------------------------
Several bug fixes, new features:
- Perl script mkpdfsls.pl to create a slide show of photos
- Developer documentation created by doxygen.
----------------------------------------------------------------------
This package is located at
http://mirror.ctan.org/support/bmeps
. More information is at
http://tug.ctan.org/info/?id=bmeps
(if the package is new it may take a day for that information to
appear). We are supported by the TeX Users Group http://www.tug.org .
Please join a users group; see http://www.tug.org/usergroups.html .
_______________________________________________
Thanks for the upload.
For the CTAN Team
Rainer Schöpf
_______________________________________________
Ctan-ann mailing list
Ctan-ann at dante.dehttps://lists.dante.de/mailman/listinfo/ctan-ann
_______________________________________________
At 22:16 04.08.09, Uwe Lueck wrote:
>-----Ursprüngliche Nachricht-----
>Von: Uwe Lück <uwe.lueck at web.de>
>Gesendet: 04.08.09 22:09:16
>An: Beverley Eyre <bev at eyremail.net>, texhax at tug.org
>CC: Dr C L Tondo <drtondo at t3works.com>
>Betreff: Re: [texhax] Using .png, .jpg, .gif
>Hi,
>
>----- At 05:43 02.07.09, Beverley Eyre wrote: -----
> > I've been playing with the graphicx package trying to figure out
> > how to easily use non-postscript images in a latex doc.
> > I know that I could use pdflatex, but then I'd have the inverse problem.
>
>(There was
>
> http://tug.org/mailman/htdig/texhax/2009-July/012860.html
>
>on this list on this theme.)
>
> > I want a universal solution.
> >
> > I'd like to get \DeclareGraphicsRule to work, but it seems more trouble
> > to use than just converting each image file by hand.
> >
> > For example, if I want to use a .png file:
> > \DeclareGraphicsExtensions{.png, .eps}
> > \DeclareGraphicsRule{.png}{eps}{*}{`convert #1}
> > %% (the last arg I've done in many different ways, e.g. {`convert #1
>eps:- } )
> >
> > then, in the body:
> >
> > \includegraphics[width=1in]{myimage} %% (which is myimage.png)
>
>If it were that simple, namely the method to read .eps worked as well with
>.jpg etc., this would have been provided by the graphics bundle for more
>than 10 years. It is not -- of course. LaTeX can read the dimensions from
>an .eps because this information is contained in an .eps as a plain text
>line -- in those other files such information is encrypted in a binary way.
>Extracting it using "ordinary" TeX would require emulating real graphics
>software by TeX macros. This might (I am still not perfectly informed,
>please correct me) include emulating unzip by TeX macros -- an idea I like
>much; but there is an essential limitation: TeX's buffer size. There is a
>chance that the graphics file is too large and has too few "endline" bytes
>to be bitable for TeX.
>
>I have now collected some relevant things from the UK TeX FAQ (searched for
>`png' and `jpg'). While in a parallel thread epstopdf and using PDFLaTeX
>rather than "ordinary" LaTeX was recommended, one may still prefer
>"ordinary" LaTeX, perhaps because one's DVI viewer shows the page one is
>editing more reliably than your PDF viewer (cf. pdfsync package). There are
>some nice extensions to the graphics bundle:
>
>1. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dvipsgraphics
>
>-- some tools converting to eps, general: ImageQuick's `convert', cf.
>
> http://www.imagemagick.org/script/command-line-processing.php
>
>(Was mentioned in the original posting, included here for other readers.)
>
>2. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dvipdfmgraphics
>
>-- a utility ebb extracting bounding boxes! -- part of dvipdfm package, cf.
>p. 20 of
>
> http://tug.ctan.org/tex-archive/dviware/dvipdfm/dvipdfm.pdf
>
>\par May be related, too:
>
>3. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=unkgrfextn
>
>4. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdftexgraphics
>
>HTH -- Uwe L.
>
>
>----- Originalnachricht -----
>Gesendet: 2009/07/02 05:43:28
>Betreff: [texhax] Using .png, .jpg, .gif
>
>Hi all.
>
>I've been playing with the graphicx package trying to figure out how to
>easily use non-postscript images in a latex doc. I know that I could use
>pdflatex, but then I'd have the inverse problem. I want a universal solution.
>
>I'd like to get \DeclareGraphicsRule to work, but it seems more trouble to
>use than just converting each image file by hand.
>
>For example, if I want to use a .png file:
>\DeclareGraphicsExtensions{.png, .eps}
>\DeclareGraphicsRule{.png}{eps}{*}{`convert #1} %% (the last arg I've done
>in many different ways, e.g. {`convert #1 eps:- } )
>
>then, in the body:
>
>\includegraphics[width=1in]{myimage} %% (which is myimage.png)
>
>I get an error msg telling me that I there is no bounding box. So in order
>to use it, I have to determine the bounding box for the image first, and
>then include that info into one or the other command. But, if I just do:
>
> > convert myimage.png myimage.eps
>
>on the command line, it converts it without having to know the bounding box
>info. I'm not sure why convert needs the bounding box info in one case
>(latex) but not the other (command line).
>
>So, I'm not really getting the point of \DeclareGraphicsRule since using it
>is much more trouble than converting by hand. Which brings me back to my
>point, is there any easy way to use non-postscript images in a latex doc?
>My best guess at this point is no, and the only way forward is to re-write
>some of the graphicx commands to that they can use the bounding box info
>generated by 'convert' or some other conversion program.
>
>TIA for any help or discussion.
>
>Beverley Eyre
More information about the texhax
mailing list