[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: [RFC] Limiting the file formats used by KoPicture (KWord/KPresenter)
From:       Clarence Dang <dang () kde ! org>
Date:       2003-02-03 9:35:13
[Download RAW message or body]

On Mon, 27 Jan 2003 12:31 pm, Nicolas Goutte wrote:
> On Monday 27 January 2003 00:34, Clarence Dang wrote:
> > On Sun, 26 Jan 2003 01:15 am, Nicolas Goutte wrote:
> > > Currently in KoPicture, we assume that QImageIO can handle all image
> > > formats used in KWord and KPresenter. However, it limits the
> > > portability of KWord and KPresenter file formats, as a non-QT
> > > application could suddenly have to deal with an image file format that
> > > it does not know.
> > >
> > > Therefore, I would like to limit the file formats used by KoPicture to:
> >
> > Please, please, do not do this!
> >
I've actually changed my mind (I can see the problems the current situation 
can and will cause after re-reading your email) so now I'm largely in favour 
of your proposal, just as long as it's not done right now (as you've already 
posted).  There are still a few things I'd like to discuss though:

> > > In a distant future, I would like to remove WMF and QPicture, but
> > > currently it is not possible.
> >
> > I disagree.  If WMF support is removed, then certain filters would have
> > to convert to e.g. BMP and then have to convert back to WMF on export (a
> > real waste of time and effort).  In the general case, forcing filters to
> > convert to certain types of images and back on export would surely
> > increase the lossiness of the filters (which is already too high) and
> > decrease their performace.
>
> WMF is supposed to be converted to SVG (or perhaps directly to Karbon) and
> then back if needed. 
Actually, all the WMFs I work with simply contain a BMP so I don't know how 
that will work with SVG.

> Of course it means that we first need a correct SVG
> (or Karbon) support before doing this (so it is more for KOffice 2.0,
> whenever that would be.)
>
Yes, waiting until then would be fine but from the talk about XML file format 
standardisation, I continually get this impression that the KWord format is 
going to get dropped but maybe it's just me not getting enough sleep.

> As for lossiness, I do not think so. PNG can do everything another image
> format can do, including transparency. The only problems are JPEG and
> JPEG2000, as using PNG instead result in much larger files.
>
Size is not the problem really, IMHO.  It's just that JPEG->PNG->JPEG is sure 
to lose quality and introduce artifcats due to lossy recompression.

> > > In a less distant future and perhaps already
> > > for KOffice 1.3, I would like to remove BMP too.
> >
> > But why?  Both WMF and BMP are well supported.  In both Windows and
> > Linux. Certainly BMP support should not be removed since BMP is a fairly
> > universal format.
>
> We are replacing MS Office, do not we want to replace MS file formats too?
>
Yes with WMF because it's so tricky to handle and largely designed around 
WinGDI calls but with BMP, it's a reasonable and common format (except for 
the upside-down business but IIRC, it wasn't MS' fault).  This is what a user 
would not want:

1. Insert a BMP into MS Word and save it
2. Open the .doc in KWord.  It's converted to PNG.
3. Make some changes and save the file back (or maybe to .rtf).  It stays as 
PNG.
4. Opens .doc/.rtf in MS Word and it's PNG, not BMP.

This would be highly unexpected and IIRC, MS Paint can't read/write PNG (at 
least not in Win98, iirc).  As a minimum, we should support common formats 
like BMP.

> I do not mind keeping BMP, but as converting it to PNG does not lose
> anything, it thought it would be better to convert it. (Reason: smaller
> temporary files in KoPictureImage.)
>
I think performance and reducing confusion is more important than disk space 
here...

> For WMF, well, we have already found files (with the special header) that
> do not follow the specifications. So how many variants exist too? Can the
> foreign application read all these variants too?
>
> That is exactly what I would want to avoid: it is to have a KWord file that
> a foreign application cannot read because of the used picture file.
>
(...)
> That is a
> whole jungle of file formats and not always common ones.
Ok, now I agree.

> > I actually have to convert PNG to WMF...
>
> Why not to BMP? Or does MSWrite only knows WMF?
>
It knows:
1. BMP (but only monochrome ones it seems, making this quite useless for the 
general case)
2. WMF
3. OLE (too hard to play with)

So what I do is convert the images KWord throws at me into BMP and then into 
WMF.

Clarence

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic