On Tue, Nov 12, 2013 at 11:22:40PM +0100, Massimiliano Gubinelli wrote: > > As to pure image formats (jpg, png, tiff, svg, etc.), I would like to avoid > > depending on too many libraries. Ideally, Qt should be able to do them > > all for us. If not, Qt in combination with a tool such as ImageMagick > > which supports many different formats. I agree that it is best to touch > > images files as little as possible when including them in Pdf output. > > Is there a way to include them in some kind of verbatim/escaped fashion? > > > I still don't understand why libpng and the jpeg library would be necessary. > > I was looking to how pdftex handle the problem. If I understand well their > code they can include directly jpg images without any external support (and > without uncompressing the jpg stream). For png they rely on libpng to read > the files. I think I can use Qt to read the actual bits and obtain enough > information (DPI, color depth, color map, to reconstruct a faithful > representation of the png data inside the pdf).
I still don't understand something. How exactly are png and jpg images stored in Pdf files? If they are compressed in the standard png/jpg way, then I would expect the images to be included in a verbatim/escaped way. If they are compressed in an ad hoc Pdf way, then why would we need libpng, except for obtaining the pixmaps (which Qt can give us)? > The point is that ideally one should keep (lossy and lossless) compressed > formats compressed. Qt can read all the formats but give back only the > uncompressed bits, so this is almost useless if you want to put the image > into a compressed file format like PDF. The point is to try to maintain the > data compressed without wasting time in uncompressing it and then > recompressing it (in necessarily unoptimal ways). I agree that compressed images should not be touched. But if we do not want to touch them, why do we need libpng? > > There is also the question of producing image files directly from TeXmacs, > > for instance when exporting mathematical formulas to Html. What exactly > > does Qt provide for the manipulation of image _files_? > > Qt can produce images (especially raster) to any common format (png, maybe > jpg, pdf and eps) so I think there are no problem producing them. Does Qt also perform the corresponding compression? Best wishes, --Joris _______________________________________________ Texmacs-dev mailing list Texmacs-dev@gnu.org https://lists.gnu.org/mailman/listinfo/texmacs-dev