Re: extragear/graphics/gwenview
Angelo Naselli <[email protected]>
| Newsgroups | gmane.comp.kde.gwenview |
|---|---|
| Message-ID | <[email protected]> |
Alle 15:17, lunedì 26 marzo 2007, Aurelien Gateau ha scritto: > On Sun, 25 Mar 2007 21:14:58 +0000, Angelo Naselli <[email protected]> wrote: > > SVN commit 646489 by anaselli: > > > > Now jpeg with exif info can be managed for printing without scaling as > > well. The only problem is that new cameras have too big pictures mine for instance seems to have 32.5cm x 43.3 cm and that means it has to be shrinked anyway... > > Please Aurélien take a look at it. > > Sounds great, thanks! > > Only a few nitpicks: > - JPEGContent follows Qt naming convention of not prefixing getters with "get" eheh I didn't use that because i thought it could have been confused :) > - The code in the two getters is almost identical. It could probably be merged like this: that's right. > dotsPerMeterX() { > return dotsPerMeter("XResolution"); > } > > dotsPerMeterY() { > return dotsPerMeter("YResolution"); > } > > dotsPerMeter(const QString& keyName) { > Exiv2::ExifKey keyResUnit("Exif.Image.ResolutionUnit"); > Exiv2::ExifData::iterator it = d->mExifData.findKey(keyResUnit); > if (it == d->mExifData.end()) { > return 0; > } > int XRes = it->toLong(); > Exiv2::ExifKey keyXResolution("Exif.Image." + keyName"); > it = d->mExifData.findKey(keyXResolution); > if (it == d->mExifData.end()) { > return 0; > } > // The unit for measuring XResolution and YResolution. The same unit is used for both XResolution and YResolution. > // If the image resolution in unknown, 2 (inches) is designated. > // Default = 2 > // 2 = inches > // 3 = centimeters > // Other = reserved > const float INCHESPERMETER = (100. / 2.54); > switch (XRes) { > case 3: // dots per cm > return (it->toLong() * 100); > default: // dots per inch > return (it->toLong() * INCHESPERMETER); > } > > return 0; > } > > What do you think about this? It sounds good to me, I committed what i tested last night, to have it in svn... you know time is coming ;) I can do the changes, not tonight though. Feel free to commit it. Thanks, Angelo ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Gwenview-general mailing list Gwenview-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/gwenview-general
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBGCDNAqEs9DA4DquARAhGgAKCtN1qgtHOgLFRL6ZyJxM8CJbb4MgCdEIbj dEiu47/Gp26hyDClAC2cJro= =7Jbc -----END PGP SIGNATURE-----