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

List:       kde-devel
Subject:    Re: QImage conversion functions
From:       Thomas Gillespie <tomjamesgillespie () googlemail ! com>
Date:       2008-08-26 20:55:15
Message-ID: 200808262155.15391.tomjamesgillespie () googlemail ! com
[Download RAW message or body]

On Tuesday 26 August 2008 20:55:29 David Johnson wrote:
> Here's the code I meant to attach:
>
> #include <QDebug>
> #include <QtGui>
>
> int main()
> {
>     QImage img = QImage("image.png");
>     int newHeight= img.height()*2;
>     int newWidth= img.width()*2;
>     img = img.scaled(newWidth, newHeight, Qt::KeepAspectRatio,
>                      Qt::SmoothTransformation);
>     img = img.convertToFormat(QImage::Format_Mono, Qt::MonoOnly);
>     img.setDotsPerMeterX(150*39); //150 dpi
>     img.setDotsPerMeterY(150*39); //150 dpi
>     qDebug() << img.depth();
>     img.save("output.tif", "tiff", 100);
>     img.save("output.png", "png", 100);
> }

The code still didn't work, tesseract just didnt give any output. And it gets 
stranger.... if i just convert the file directly with "convert in.png out.tif" 
with no switches tesseract will read it. but it wont read any images that ive 
produced from qt. Is there something wrong with qt's tif exporter? is there a 
tool that can examine the tiff headers or something to see whats different 
between qt's and imagemagicks?

Thanks

Tom
 
>> 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