If you are reading the binary data as strings you probably are encountering 
files that contain the old style   end of file byte as

Sent from my Windows Phone

-----Original Message-----
From: n...@nrbs.com
Sent: Sunday, June 05, 2011 7:43 AM
To: Delphi request
Subject: Strange loop behaviour [repeat loop]


Hi

I have a program that reads PCL data and converts to bitmaps.
I am using a stringlist for this data. I read the strings and convert
them to binary, loop through the binary lines and draw black pixels
for 1s and white pixels for 0s.

The program works and is very fast. However, sometimes the LAST
line is skipped when converting to dots.

I have created a strings object where I write each line of data just
after convertion to dots. This registers correctly so I know that my
data is not corrupt when the routine reads the strings.

Typically, there are between 3 and 40 lines for each character
and each line contains around 36  elements of 1s or 0s.

I have checked all initial values before drawing on the bitmap
canvas using canvas.fillrect.

The problem is this error only happens sometimes, [but always
the same files]. I have checked these files using a hex editor and
the data is definitely present.

Any thoughts would be extremely welcome.

Thanks in advance

Neil




_______________________________________________
Delphi mailing list
Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

[Lane Individual Practice Association]<http://lipa.net>


Del Texley
I.S. Administrator/ISO
1800 Millrace Drive, Eugene, OR 97403
Ph: 541-484-6430 Fax: 541-434-1067

This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.

_______________________________________________
Delphi mailing list
Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to