mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-07 03:58:26 +02:00
fpvectorial-eps: Further implementation of the image operator, not yet working
git-svn-id: trunk@42159 -
This commit is contained in:
parent
c11a7d82dc
commit
7b2d487b16
@ -1620,10 +1620,11 @@ function TvEPSVectorialReader.ExecutePaintingOperator(AToken: TExpressionToken;
|
|||||||
var
|
var
|
||||||
Param1, Param2: TPSToken;
|
Param1, Param2: TPSToken;
|
||||||
// image operator data
|
// image operator data
|
||||||
lFindIndex: Integer;
|
i, lFindIndex: Integer;
|
||||||
lDataSource, lImageDataStr: String;
|
lDataSource, lImageDataStr: String;
|
||||||
lImageWidth, lImageHeight, lImageBitsPerComponent: Integer;
|
lImageWidth, lImageHeight, lImageBitsPerComponent: Integer;
|
||||||
lImageData: array of Byte;
|
lImageData: array of Byte;
|
||||||
|
lImageDataPtr: PCardinal;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -1698,9 +1699,18 @@ begin
|
|||||||
|
|
||||||
if TDictionaryToken(Param1).Names.Find('ASCII85Decode', lFindIndex) then
|
if TDictionaryToken(Param1).Names.Find('ASCII85Decode', lFindIndex) then
|
||||||
begin
|
begin
|
||||||
{SetLength(lImageData, Length(lImageDataStr));
|
SetLength(lImageData, (Length(lImageDataStr)*4) div 5);
|
||||||
for i := 1 to Length(lImageDataStr) do
|
|
||||||
lImageData[i-1] := Byte(lImageDataStr[i]);}
|
i := 1;
|
||||||
|
while i <= Length(lImageDataStr)-4 do
|
||||||
|
begin
|
||||||
|
lImageDataPtr := @(lImageData[(i-1)*4 div 5]);
|
||||||
|
lImageDataPtr^ := (Byte(lImageDataStr[i])-33)*85*85*85*85
|
||||||
|
+ (Byte(lImageDataStr[i+1])-33)*85*85*85 + (Byte(lImageDataStr[i+2])-33)*85*85
|
||||||
|
+ (Byte(lImageDataStr[i+3])-33)*85 + (Byte(lImageDataStr[i+4])-33);
|
||||||
|
|
||||||
|
Inc(i, 5);
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user