[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Write a binary string(image) to a file

  AssignFile(tiffFile, 'c:\Test1.tif');
   ReWrite(tiffFile);
   BlockWrite(tiffFile,a,1);
   CloseFile(tiffFile);
this is what I have but for some reason the tiff when read from the string is II* and if I look into the file after it being written it doesnt start with II* what am I doing wrong?

Tom
0
T0masz
Asked:
T0masz
1 Solution
 
T0maszAuthor Commented:
a is a string
and tiffFile is a File
0
 
ZhaawZSoftware DeveloperCommented:
try this:

AssignFile(tiffFile, 'c:\Test1.tif');
ReWrite(tiffFile, 1);
BlockWrite(tiffFile, a[1], length(a));
CloseFile(tiffFile);
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now