Development | Design Work | Code Management | Collaboration |
---|---|---|---|
Programming Languages | Testing | Technology Stack |
---|---|---|
GraphicEx - a Delphi image loader library
Home Page: www.soft-gems.net
License: Mozilla Public License 2.0
I tried to use GraphicEX with DelphiXE6, but got the following errors:
[dcc32 Fehler] JPG.pas(1136): E2065 Ungenügende Forward- oder External-Deklaration: 'jpeg_reset_huff_decode'
[dcc32 Fehler] JPG.pas(1258): E2065 Ungenügende Forward- oder External-Deklaration: '@jfwrite'
[dcc32 Fehler] JPG.pas(1258): E2065 Ungenügende Forward- oder External-Deklaration: '@jfflush'
[dcc32 Fehler] JPG.pas(1258): E2065 Ungenügende Forward- oder External-Deklaration: '@JFread'
best regards
Patrick
It requires "zutil.obj". TIFF.pas line 613:
{$L zutil.obj}
There is no such file in repository. I found zutil.c
and zutil.h
in 3rd party\DelphiZlib\zlib\
. Can I use it to get zutil.obj
? And if Yes what I need to do to get it?
P.S. I've tried it in Delphi 7 and Delphi 2010
The old Graphic-Ex used to have a memory leak in TPNGGraphic.LoadFromStream.
I believe this leak still exists (now in TPNGGraphic.LoadFromMemory).
It was described in this thread (in german): http://www.delphipraxis.net/875740-post2.html
GraphicEx compiles out of the box for me with Delphi 10.2 and newer. However the graphic formats do not implement TGraphic.CanLoadFromStream and thatswhy Delphi 10.2 and newer are not fully supported.
Background:
As soon as one tries to load TPicture from an empty stream, TPicture thinks that the empty stream is of a GraphicEx graphic class, because the GraphicEx graphic classes are inherited from TBitmap, which has "Result := (Stream.Size - Stream.Position = 0) or ..." in the CanLoadFromStream implementation.
For more information see https://quality.embarcadero.com/browse/RSP-24474
(login for quality portal required!)
When putting GraphicEx in the uses clause instead of registering TNOPGraphic it crashs in any case in TGEDGraphic.ReadImageProperties, because TGEDGraphic.CanLoadFromStream is True and not False.
Since I cannot use/compile GraphicEx in XE7, I made a .dll using Turbo Delphi for GraphicEx images operations, and then call the functions from a host application made in XE7. Up until moments ago, all runs fine, until somehow whenever I close my host app, I got an exception which only occurs when in development (using XE7) but never shows up when run .exe directly.
After nightmare of debugging, I finally locate the problem being in GraphicEx in .dll, by removing it from uses clause, disable/commenting all GraphicEx functions call and then recompile the .dll, and after that the exception in host app never shows again.
I'm thinking there is a problem in lines 3390 to 3406 of GraphicColor.pas.
This is the 16bit RGB to 16bit BGR conversion code; but it looks like the code in those lines was copy pasted from the BGR2BGR version of the function. It is resulting in the source colors being interpreted in a backwards order. I'm not sure those lines are actually needed as the assignment to the Source RGB pointers also happens above in lines 3290 to 3306.
The code path of 16bit RGB to 8bit BGR works fine; only the 16bit to 16bit has the issue.
Hello,
there is a problem while pasting a bitmap from clipboard into TPicture.
GraphicEx is unregistering the ClipBoard format.
Steps to reproduce:
uses
ClipBrd, GraphicEx;
procedure TForm5.Button1Click(Sender: TObject);
begin
Image1.Picture.Assign(Clipboard);
end;
Expected: Bitmap is pasted
Found: EClipboardException (unregistered format).
Workaround:
Uncomment these lines in GraphicEx initialization block:
// Since we are going to add these four image types below, we better unregister them first
// in order to avoid double entries.
// TODO: enable jpeg image
{ TPicture.UnregisterGraphicClass(TJPEGImage);
TPicture.UnregisterGraphicClass(TBitmap);
TPicture.UnregisterGraphicClass(TIcon);
TPicture.UnregisterGraphicClass(TMetafile);
}
TPicture.UnregisterGraphicClass unregister FileExtension AND Clipboard format!
Best regards
Dirk
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.