🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #334

Re: jpg to bmp from FrameCallbackProc without fileio

#334
From: Peter Fagerbrant
Date: Wed, 19 Jan 2005 13:21
27 lines
2265 bytes
> Well if Scanline[] was an array that would work. But if []
> is an operator it would fail. You could just give it a try.
>
> Hans.

The function look like this:
function TBitmap.GetScanLine(Row: Integer): Pointer;
begin
  Changing(Self);
  with FImage.FDIB, dsbm, dsbmih do
  begin
    if (Row < 0) or (Row >= bmHeight) then
      InvalidOperation(@SScanLine);
    DIBNeeded;
    GDIFlush;
    if biHeight > 0 then  // bottom-up DIB
      Row := biHeight - Row - 1;
    Integer(Result) := Integer(bmBits) +
      Row * BytesPerScanline(biWidth, biBitCount, 32);
  end;
end;

As it says, it do returns a pointer, but limmited to the width of the 
pixelmap.
And it recreates the DIB for every access.

I have no clues to how make it faster. 
Technical Details
Message-ID: <41ee5eea$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41ebb760@newsgroups.borland.com> <41ebbf15$1@newsgroups.borland.com> <41ebc6d3$1@newsgroups.borland.com> <41ebcb8c$1@newsgroups.borland.com> <41ebce5b$1@newsgroups.borland.com> <41ebd086$1@newsgroups.borland.com> <41ebd7a4@newsgroups.borland.com> <41ebdb02@newsgroups.borland.com> <41ee20a3$1@newsgroups.borland.com> <41ee3744$1@newsgroups.borland.com> <41ee3e3f$1@newsgroups.borland.com> <41ee43e8$1@newsgroups.borland.com> <41ee4f26$1@newsgroups.borland.com> <41ee5665$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,e7775a35dcf064b6
X-Google-Attributes: gid10d0fc,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Peter Fagerbrant" <peter@fagerbrant.com>
Newsgroups: borland.public.cppbuilder.multimedia
References: <41ebb760@newsgroups.borland.com> <41ebbf15$1@newsgroups.borland.com> <41ebc6d3$1@newsgroups.borland.com> <41ebcb8c$1@newsgroups.borland.com> <41ebce5b$1@newsgroups.borland.com> <41ebd086$1@newsgroups.borland.com> <41ebd7a4@newsgroups.borland.com> <41ebdb02@newsgroups.borland.com> <41ee20a3$1@newsgroups.borland.com> <41ee3744$1@newsgroups.borland.com> <41ee3e3f$1@newsgroups.borland.com> <41ee43e8$1@newsgroups.borland.com> <41ee4f26$1@newsgroups.borland.com> <41ee5665$1@newsgroups.borland.com>
Subject: Re: jpg to bmp from FrameCallbackProc without fileio
Date: Wed, 19 Jan 2005 14:21:46 +0100
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 193.14.171.139
Message-ID: <41ee5eea$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106140906 193.14.171.139 (19 Jan 2005 05:21:46 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail