Thread View: borland.public.delphi.graphics
8 messages
8 total messages
Started by Gerhard Wessels
Tue, 05 Aug 2008 07:08
Twain
Author: Gerhard Wessels
Date: Tue, 05 Aug 2008 07:08
Date: Tue, 05 Aug 2008 07:08
26 lines
1480 bytes
1480 bytes
Hello All, I am looking for a good (read stable & FAST) graphics library that supports twain. I need to scan a document from any twain enabled device and convert it into a Microsoft Fax faxable format. And all this on a PC with less than ideal CPU power. What I've found so far include: Dosadi HiComponents KDImage MCM Design Skyline We're currently using Gustavo Daud's Delphi Twain together with LibTiff but we're having difficulties with this solution. It works but it is not great. We're a bit resource strapped (developer wise) so I'd like to get a one-stop-solution. Any suggestions would be appreciated. Thank you, Gerhard
Re: Twain
Author: Scott Martin
Date: Tue, 05 Aug 2008 18:50
Date: Tue, 05 Aug 2008 18:50
8 lines
1013 bytes
1013 bytes
Happy with ImageEn myself. regards, Scott. > What I've found so far include: > > HiComponents
Re: Twain
Author: GrandmasterB
Date: Tue, 05 Aug 2008 19:50
Date: Tue, 05 Aug 2008 19:50
9 lines
1328 bytes
1328 bytes
"Gerhard Wessels" <gerhardwessels@gmail.com> wrote in message news:4897fc74@newsgroups.borland.com... > We're currently using Gustavo Daud's Delphi Twain together with LibTiff > but we're having difficulties with this solution. It works but it is not > great. What does 'having difficulties' mean? Delphi Twain has always worked perfectly for me. Are you having trouble making the tiff? There's a number of ways of doing that, with GDI+ being a very good choice.
Re: Twain
Author: Gerhard Wessels
Date: Wed, 06 Aug 2008 05:56
Date: Wed, 06 Aug 2008 05:56
70 lines
4242 bytes
4242 bytes
GrandmasterB wrote: > "Gerhard Wessels" <gerhardwessels@gmail.com> wrote in message > news:4897fc74@newsgroups.borland.com... >> We're currently using Gustavo Daud's Delphi Twain together with LibTiff >> but we're having difficulties with this solution. It works but it is not >> great. > > What does 'having difficulties' mean? Delphi Twain has always worked > perfectly for me. Are you having trouble making the tiff? There's a number > of ways of doing that, with GDI+ being a very good choice. > > > Difficulties relate to speed. The application runs on a 500MHz, 512MB ram machine. The application needs to scan images from a multi functional device or scanner, convert it into the correct multi page tiff format and send it to Microsoft Fax for faxing. The issue is getting it into the correct format quickly. By "correct" format I mean a format that doesn't require MS Fax to process it further - which is what happens when the file is not exactly correct. You may have inferred from my original post that we're trying to get rid of Delphi Twain and/or LibTiff. This is not necessarily the case. I have inherited this project so I am trying to tap into the "Collective" to get to the most efficient way of creating the tiff. If what we have is the best way then fair enough, but if there is a better (read faster) way then we would go for that. So, yes, we're having difficulty in creating a multi page tiff in the exact format MS Fax expects. Here is what we've found regarding the MS Fax format: Fax Image Format The fax service creates fax documents as Tagged Image File Format Class F (TIFF Class F) (for facsimile) files based on the Tagged Image File Format (TIFF) 6.0 specification. In addition to the requirements of the TIFF 6.0 specification, the fax service has the following requirements for TIFF Class F files: � TIFF files must have the Modified Modified READ (MMR) two-dimensional encoding data compression format. This format is defined by CCITT (The International Telegraph and Telephone Consultative Committee) Group 4. � The byte-ordering format of TIFF files must match the byte-ordering format of the CPU processing the file. For example, if a little-endian CPU is receiving the TIFF file, the file must be in little-endian format. � The TIFF field (tag) RowsPerStrip must contain a value of 1. This is because the fax service does not support transmission of data image strips. The RowsPerStrip describes the number of scan lines per image strip in the facsimile image. I know that asking a 500MHz machine to do this kind of processing very quickly is possibly asking for too much, but I need to know that we're doing everything as efficiently as possible. If it still too slow, well then it can't be done and we'd have to find faster machines... Also, we're severely understaffed so I cannot spend months on this. I would greatly appreciate any help/suggestions/code samples etc. I apologize for the long post but I wanted to explain the situation clearly. Best regards, Gerhard
Re: Twain
Author: Herre de Jonge
Date: Wed, 06 Aug 2008 06:47
Date: Wed, 06 Aug 2008 06:47
17 lines
1913 bytes
1913 bytes
> I know that asking a 500MHz machine to do this kind of processing very > quickly is possibly asking for too much, but I need to know that we're > doing everything as efficiently as possible. If it still too slow, well > then it can't be done and we'd have to find faster machines... > > Also, we're severely understaffed so I cannot spend months on this. I > would greatly appreciate any help/suggestions/code samples etc. > > I apologize for the long post but I wanted to explain the situation > clearly. I _think_ this TIFF functionality is easily implemented with GDI+, but I don't know if that is faster than your current implementation, though. Also I wonder if it's not cheaper to buy a faster (2nd hand?) PC. (Or switch to Linux...)
Re: Twain
Author: GrandmasterB
Date: Wed, 06 Aug 2008 19:21
Date: Wed, 06 Aug 2008 19:21
28 lines
2547 bytes
2547 bytes
"Gerhard Wessels" <gerhardwessels@gmail.com> wrote in message news:48993d19@newsgroups.borland.com... > The issue is getting it into the correct format quickly. By "correct" > format I mean a format that doesn't require MS Fax to process it further Ok. Then it sounds like you have even more options then, as you dont need both a scanning and image toolkit, and you dont have to screw around with modifying and testing the scanning. I usually use GDI+ for image encoding, as its worked well in creating files that are 'widely' accepted.. It may be something you'd want to look at for no other reason than its what windows/IE use to encode files. So it may be able to make tiff files that windows fax likes. A 500mhz should be able to handle the job, though as Herre suggested, hardware is cheap nowadays and the fastest, cheapest solution to speeding things up might be to install this on something at least > 2 ghz.. Would it be feasable to put another 512 meg ram in there? That might speed things up greatly if the problem is that its running low on operating ram and causing things to swap back and forth to disk as it manipulates images. Assuming the machine can see that much ram :-) > I apologize for the long post but I wanted to explain the situation > clearly. No, thats exactly the best way to describe a problem. If you just ask for toolkits, you'll get a dozen different recommendations, but they may not help with your specific problem.
Re: Twain
Author: Gerhard Wessels
Date: Thu, 07 Aug 2008 04:35
Date: Thu, 07 Aug 2008 04:35
53 lines
3433 bytes
3433 bytes
GrandmasterB wrote: > "Gerhard Wessels" <gerhardwessels@gmail.com> wrote in message > news:48993d19@newsgroups.borland.com... >> The issue is getting it into the correct format quickly. By "correct" >> format I mean a format that doesn't require MS Fax to process it further > > Ok. Then it sounds like you have even more options then, as you dont need > both a scanning and image toolkit, and you dont have to screw around with > modifying and testing the scanning. > > I usually use GDI+ for image encoding, as its worked well in creating files > that are 'widely' accepted.. It may be something you'd want to look at for > no other reason than its what windows/IE use to encode files. So it may be > able to make tiff files that windows fax likes. > > A 500mhz should be able to handle the job, though as Herre suggested, > hardware is cheap nowadays and the fastest, cheapest solution to speeding > things up might be to install this on something at least > 2 ghz.. Would it > be feasable to put another 512 meg ram in there? That might speed things up > greatly if the problem is that its running low on operating ram and causing > things to swap back and forth to disk as it manipulates images. Assuming > the machine can see that much ram :-) > >> I apologize for the long post but I wanted to explain the situation >> clearly. > > No, thats exactly the best way to describe a problem. If you just ask for > toolkits, you'll get a dozen different recommendations, but they may not > help with your specific problem. > > > Thank you for your suggestions. We are looking into using beefier machines for this application. I've neglected to mention (again!) that this is not a once off problem/solution. We're a big(ish) company that sells MFD's and with it a "controller" that extends the functionality of the MFD. Changing the hardware is therefore not as easy as it sounds. The whole supply chain needs to change. But we are busy with a process... I've read somewhere that GDI+ does not support 1 bit graphics - which is what fax requires. Is this correct? Anyways, we're looking into using Microsoft's fax printer at the moment. We get a DC to print to and from there Microsoft handles the whole job. Hopefully it is fast enough. If it is, it solves our image conversion problem! I'll know soon... Regards, Gerhard
Re: Twain
Author: Herre de Jonge
Date: Thu, 07 Aug 2008 07:37
Date: Thu, 07 Aug 2008 07:37
30 lines
2512 bytes
2512 bytes
> We are looking into using beefier machines for this application. I've
> neglected to mention (again!) that this is not a once off
> problem/solution. We're a big(ish) company that sells MFD's and with it
> a "controller" that extends the functionality of the MFD. Changing the
> hardware is therefore not as easy as it sounds. The whole supply chain
> needs to change. But we are busy with a process...
>
> I've read somewhere that GDI+ does not support 1 bit graphics - which is
> what fax requires. Is this correct?
When working with bitmaps (which in GDI+ just means any raster type
image; TIFF, JPG, PNG, BMP etc.) you can specify PixelFormat1bppIndexed
as pixel format in the constructor.
> Anyways, we're looking into using Microsoft's fax printer at the moment.
> We get a DC to print to and from there Microsoft handles the whole job.
> Hopefully it is fast enough. If it is, it solves our image conversion
> problem!
That should work as well.
Do you prepare your images in the fax resolution (200dpi or actually
204x196dpi (Fine) or 204x98dpi (Standard))? Also faxing tends to be
slower when there are many 'switches' between black and white pixels,
because it is run-length encoded. Scanned images often have many
'extra pixels' in the white areas. [You probably already know/discovered
this, but I thought to just mention it.]
Good luck,
Herre
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads