Ahem,
Can anyone tell me.........
I have a stream representation of a jpeg file. This has header information,
then the graphic information. I need to INSERT more information (the comment
info I spoke of before).
So is this how I should do it (seems to work OK):
Generate a new stream
Read out from oldstream olds.read(data,1), and transfer the data I need into
NewStream news.write(data,1), keeping the OldStream position, which is now
at the start of graphics information.
Generate the data into NewStream, taking care of header information and so
on.

At this point I want to take what is left over from OldStream (the graphic
part), and drop it into the current marker position in NewStream:

  i:=oldS.Size-oldS.Position;
  newS.CopyFrom(oldS,(i));
  Result:=newS;

Do I get the cigar, or is it wrong?

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to