Comments (6)
Hi. Older version of fpc may not have all features required by the newest version. Also bgrabitmap depends on LCL that's also moving.
Try checking what was the release date of that Lazarus version and try downloading an old version of bgrabitmap and bgracontrols.
from bgracontrols.
Hmmm maybe it can be made compatible with Lazarus 2.0.8 that uses FPC 3.0.4 which already has generics. In the avifbgra
unit, a new inline syntax for specialized is used, but we can do without it.
@tcsorgo
Can you try and replace the factory functions in the avifbgra
unit with the following:
function TAvifImageFactory(aImagePtr: Pointer): TAvifImageBase;
type
TAvigImage0_11_0 = specialize TAvifImage<PavifImage0_11_0>;
TAvigImage0_8_4 = specialize TAvifImage<PavifImage0_8_4>;
begin
if AVIF_VERSION >= AVIF_VERSION_0_11_0 then
Result := TAvigImage0_11_0.Create(aImagePtr)
else
Result := TAvigImage0_8_4.Create(aImagePtr);
end;
function TDecoderFactory(aDecoderPtr: Pointer): TDecoderBase;
type
TDecoder0_11_0 = specialize TDecoder<PAvifDecoder0_11_0>;
TDecoder0_10_0 = specialize TDecoder<PAvifDecoder0_10_0>;
TDecoder0_9_3 = specialize TDecoder<PAvifDecoder0_9_3>;
TDecoder0_9_2 = specialize TDecoder<PAvifDecoder0_9_2>;
TDecoder0_8_4 = specialize TDecoder<PAvifDecoder0_8_4>;
begin
if AVIF_VERSION >= AVIF_VERSION_0_11_0 then
result := TDecoder0_11_0.Create(aDecoderPtr)
else if AVIF_VERSION >= AVIF_VERSION_0_10_0 then
result := TDecoder0_10_0.Create(aDecoderPtr)
else if AVIF_VERSION >= AVIF_VERSION_0_9_3 then
result := TDecoder0_9_3.Create(aDecoderPtr)
else if AVIF_VERSION >= AVIF_VERSION_0_9_2 then
result := TDecoder0_9_2.Create(aDecoderPtr)
else
result := TDecoder0_8_4.Create(aDecoderPtr);
end;
function TEncoderFactory(aEncoderPtr: Pointer): TEncoderBase;
type
TEncoder0_11_0 = specialize TEncoder<PAvifEncoder0_11_0>;
TEncoderBefore = specialize TEncoder<PAvifEncoder>;
begin
if AVIF_VERSION >= AVIF_VERSION_0_11_0 then
result:=TEncoder0_11_0.Create(aEncoderPtr)
else
result:=TEncoderBefore.Create(aEncoderPtr);
end;
function TAvifRGBImageFactory(): TAvifRGBImageBase;
type
TAvifRGBImage0_11_0 = specialize TAvifRGBImage<PavifRGBImage0_11_0>;
TAvifRGBImage0_10_0 = specialize TAvifRGBImage<PavifRGBImage0_10_0>;
TAvifRGBImage0_8_4 = specialize TAvifRGBImage<PavifRGBImage0_8_4>;
begin
if AVIF_VERSION >= AVIF_VERSION_0_11_0 then
result:=TAvifRGBImage0_11_0.Create
else if AVIF_VERSION >= AVIF_VERSION_0_10_0 then
result:=TAvifRGBImage0_10_0.Create
else
result:=TAvifRGBImage0_8_4.Create;
end;
from bgracontrols.
@circular17
I have made your proposal changing these functions.
Now I get new errors pointing to other functions.
This type of functions are concerned:
function TDecoder.GetImage:PavifImage;
begin
result := FDecoder^.image;
end;
Errors:
Csomag fordítása: BGRABitmapPack 11.5.3: Kilépési kód: 1, Hibák: 26
avifbgra.pas(231,22) Error: Illegal qualifier
avifbgra.pas(236,22) Error: Illegal qualifier
avifbgra.pas(257,20) Error: Illegal qualifier
avifbgra.pas(262,20) Error: Illegal qualifier
avifbgra.pas(267,10) Error: Illegal qualifier
avifbgra.pas(272,10) Error: Illegal qualifier
avifbgra.pas(277,10) Error: Illegal qualifier
avifbgra.pas(282,10) Error: Illegal qualifier
avifbgra.pas(287,10) Error: Illegal qualifier
avifbgra.pas(292,10) Error: Illegal qualifier
avifbgra.pas(297,10) Error: Illegal qualifier
avifbgra.pas(312,12) Error: Illegal qualifier
avifbgra.pas(317,12) Error: Illegal qualifier
avifbgra.pas(322,12) Error: Illegal qualifier
avifbgra.pas(327,12) Error: Illegal qualifier
avifbgra.pas(332,12) Error: Illegal qualifier
avifbgra.pas(337,12) Error: Illegal qualifier
avifbgra.pas(342,12) Error: Illegal qualifier
avifbgra.pas(357,20) Error: Illegal qualifier
avifbgra.pas(362,20) Error: Illegal qualifier
avifbgra.pas(367,10) Error: Illegal qualifier
avifbgra.pas(372,10) Error: Illegal qualifier
avifbgra.pas(377,10) Error: Illegal qualifier
avifbgra.pas(382,10) Error: Illegal qualifier
avifbgra.pas(387,10) Error: Illegal qualifier
avifbgra.pas(392,10) Error: Illegal qualifier
from bgracontrols.
Hmmm I don't see an easy fix for this one.
I suppose the simplest would be to remove the following units from the package: avifbgra
, BGRAReadAvif
and BGRAWriteAvif
(in the package window of BGRABitmapPack).
Then remove the reference to BGRAReadAvif
and BGRAWriteAvif
in the uses clause in BGRABitmap
unit (line 196 of bgrabitmap.pas).
Does it solve the problem?
from bgracontrols.
Hi. I've notified in the OPM thread that the information should be updated about the compatibility and they did it. It needs a more recent version of FPC
from bgracontrols.
Ok thanks
from bgracontrols.
Related Issues (20)
- TBCTrackBarUpDown OnMouseDown event not working HOT 3
- bgracontrols and Lazarus HOT 1
- TBCComboBox hint does not display in a TStatusBar
- [7.5] Cannot compile package with FPC 3.0.4 HOT 6
- SVG stretchDraw causes access violation HOT 18
- Lazarus build error during instalation, linux (POP OS 22.04) FPC 3.2.2 lazarus 2.2.0 HOT 4
- Memory leak with TBGRASVGImageList HOT 8
- question DTAnalogGauge negative value HOT 2
- Rounding corners feature is not working on Windows HOT 3
- BorderSpacing properties missing from TBGRAFlashProgressBar
- Memory leak in BGRABitmap when calling SetSize for a very large image HOT 1
- BGRABitmap cannot be compiled with current Laz/main after removal of deprecated LazUtf8Classes HOT 3
- TBGRASVGImageList memory leak HOT 5
- Tbgrathemesurface class inherited from HOT 7
- TBCPanel ignores ChildSizing.VerticalSpacing when AutoSize is active
- TBCPanel always disable ParentBackground HOT 6
- Scale fonts and borders
- BGRASVGIMageList memory leak HOT 2
- New update BGRA bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bgracontrols.