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

List:       kde-devel
Subject:    Re: QImage conversion functions
From:       David Johnson <david () usermode ! org>
Date:       2008-08-26 19:49:44
Message-ID: 200808261249.44987.david () usermode ! org
[Download RAW message or body]

On Tuesday 26 August 2008 11:04:11 am Thomas Gillespie wrote:
> But it doesnt seem to work... when i open the image in krita it tells me
> that the dpi is 100 and the colour space is rgb 8 bit, and even wierder the
> kDebug call reports the depth as 32. So tesseract doesnt seem to like it.
> Any ideas what im doing wrong?

QImage likes to keep stuff in its own internal format, so for example when you 
scale the image you lose the mono format. Reordering your operations fixed 
most things. What isn't fixed is the bit depth of the saved image. I think 
this is just how QImage saves TIFF images. When you save as PNG you get 1 bit 
depth.

Looking at the TIFF plugin, it appears that Qt is converting to ARGB32 in the 
write() method. It's a pain, but you could write your own QImageIOHandler, 
using the existing plugin as a guideline.

-- 
David Johnson
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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