mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 07:09:09 +02:00
+ setting image attributes when loading images
* fixing copyright section in the file header
This commit is contained in:
parent
43840ab3ca
commit
d76b345184
@ -1,7 +1,8 @@
|
||||
{*****************************************************************************}
|
||||
{
|
||||
$Id$
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2003 by the Free Pascal development team
|
||||
This file is part of the Free Pascal's "Free Components Library".
|
||||
Copyright (c) 2003 by Mazen NEIFER of the Free Pascal development team
|
||||
|
||||
BMP writer implementation.
|
||||
|
||||
@ -11,8 +12,8 @@
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
}
|
||||
{*****************************************************************************}
|
||||
{$mode objfpc}{$h+}
|
||||
unit FPReadBMP;
|
||||
|
||||
@ -58,9 +59,6 @@ implementation
|
||||
|
||||
uses BMPcomn;
|
||||
|
||||
const
|
||||
WhiteSpace = ' '#8#10#13;
|
||||
|
||||
constructor TFPReaderBMP.create;
|
||||
begin
|
||||
inherited create;
|
||||
@ -85,7 +83,12 @@ procedure TFPReaderBMP.InternalRead(Stream:TStream; Img:TFPCustomImage);
|
||||
begin
|
||||
Stream.Read(BFI,SizeOf(BFI));
|
||||
with BFI do
|
||||
if(bitCount = 8)
|
||||
begin
|
||||
Img.Width:=Width;
|
||||
Img.Height:=Height;
|
||||
BytesPerPixel:=BitCount SHR 3;
|
||||
end;
|
||||
if BytesPerPixel=1
|
||||
then
|
||||
begin
|
||||
// stream.read(Palet, bfh.bfOffset - 54);
|
||||
@ -140,7 +143,11 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 2003-09-08 14:10:10 mazen
|
||||
Revision 1.2 2003-09-09 11:26:59 mazen
|
||||
+ setting image attributes when loading images
|
||||
* fixing copyright section in the file header
|
||||
|
||||
Revision 1.1 2003/09/08 14:10:10 mazen
|
||||
+ adding support for loading bmp images
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user