Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi GraphicEx installieren (https://www.delphipraxis.net/46251-graphicex-installieren.html)

Money Making Machinist 21. Mai 2005 13:11


GraphicEx installieren
 
Hi,

Also ich hab mir dieses GraphicEx runtergeladen um in meinem Programm PNGs zu benutzen. Allerdings mangels Erfahrung wie solch Sachen zu installieren sind, werd ich aus der Anleitung nicht wirklick schlau.

Hier mal die Anleitung.
Der zweite Abschnitt beinhaltet was man machen muss.
Zitat:

These files belong to the GraphicEx library:

GraphicColor.pas - Contains the implementation of the color manager which is responsible for converting various pixel and color formats.
GraphicCompression.pas - Contains various implementations of encoders/decoders which are used to compress and decompress image data.
GraphicConfiguration.inc - Contains some compiler switches which control how and what image classes are compiled into the library. This is especially important when you want to enable LZW (after you made your deal with Unisys).
GraphicEx.pas - This unit is the main implementation and contains all image classes.
GraphicStrings.pas - In order to make GraphicEx localizable I have separated all strings which can be translated when used for other languages. This unit contains the english strings.
GraphicStringsDE.pas - This is the german equivalent of GraphicStrings.pas.
GraphicStringsRU.pas - And this is the russian version. Note: This unit cannot not be used currently, because the VCL is not able to handle MBCS resource strings. I will probably have to discard resource strings and use resource files later.
GraphicStringsFR.pas - This is the french equivalent of GraphicStrings.pas.
MZLib.pas - This is a one file, full Delphi translation of the famous zLib which implements a variation of Huffman encoding/decoding known as inflate/deflate or LZ77. With Delphi 5 there comes another implementation but this is based on object files and contains only a Delphi wrapper. This unit can be used standalone but still falls under the licence agreement. In GraphicEx TIF, PNG and PSP use LZ77 as compression scheme.

GraphicEx needs basically no installation because it just registers its graphic classes with TPicture on unit initialization time and from this point on TPicture is able to load images of all supported types. So all you must do to "install" GraphicEx (make its features available at runtime) is to put it in any uses clause of any source file of your project. In order to use GraphicEx images classes at design time too you should add GraphicEx and its associated files into a package of your choice. Any package will do it as long as it is also loaded at design time. Once you have included the library you can load all those exciting image formats at design time too. Note: You will not get an icon or something like this in the component palette. GraphicEx does not implement any component.

Note
With GraphicEx you might face a problem regarding unit/library conflicts. GraphicEx contains now own implementations of the JPEG and zLib libraries. The former is necessary because some internal functions are needed which are not available from the version included in Delphi. The latter lib is included because it is not available in all Delphi versions supported by GraphicEx and if it is there then it is just a wrapper around some object files.

The problems which might arise are that you have two versions of the JPEG lib in your program if you have included JPEG.pas into one of the units in your program. The same is true for the zLib. These problems are temporarily solved by using different names (JPG.pas and MZLib.pas) in GraphicEx. Once I have included an own JPEG graphic class you won't need the Delphi version of JPEG anymore. So at least this problem will elegantly be solved. The zLib conflict, however, cannot be solved this way. I wish Borland had included a real Delphi unit instead of the cheap wrapper. I have no idea how to avoid including zLib twice in a project sometimes, but fortunately this will not happen too often. If you have sources which use the zLib you can simply change the reference to MZLib and adjust a couple of identifiers. For Delphi libraries, however, you would need to recompile them if you want to change the reference, which would be asking too much. So I think in those special cases you have to live with two zLibs. If anyone can come up with an elegant solution then please contact me (Mike Lischke).


Money Making Machinist 24. Mai 2005 20:18

Re: GraphicEx installieren
 
push
:coder2:

Nils_13 24. Mai 2005 20:31

Re: GraphicEx installieren
 
Hi,

1. Hast du die Pfade gesetzt
2. Oder setz nicht die Pfade und Kopier die Dateien, die benötigt werden in das Zielverzeichniss (in dem sollte natürlich auch die Komponente sitzen)

DGL-luke 24. Mai 2005 20:49

Re: GraphicEx installieren
 
1. irgendein verzeichnis erstelle namens "Graphicex-Lib"
2. das komplette archiv da reinhauen, aber auf passen, dass sie wirklcih in dem ordner liegen ud nicht noch iene eben tiefer
3. in delphi einen bibliothekspfad drauftun

dann musst du nur noch in deiner Unit
Delphi-Quellcode:
{$define PNGGraphic}
oder so ähnlich reintun(steht in der graphicex.pas bei der deklaration von TPNGGraphic - irgendwas mit {$IFDEF}) und die graphicex.pas einbinden.

Money Making Machinist 24. Mai 2005 21:52

Re: GraphicEx installieren
 
Zitat:

Zitat von DGL-luke
1. irgendein verzeichnis erstelle namens "Graphicex-Lib"

Und wo soll ich des erstellen?
Zitat:

3. in delphi einen bibliothekspfad drauftun
HowTo?

Ich hab so was noch nie gemacht.

DGL-luke 24. Mai 2005 22:02

Re: GraphicEx installieren
 
1. absolut wurscht. vorteilhaft wäre aber der lib-pfad. (%DelphiInstalldir%\lib)

3. *delphi 7 startet* Tools -> Umgebungsoptionen->Bibliothek, die erste Ellipsen-Schaltfläche klicken, und da den Ordner dazutun.
*d2005 startet* *wartet* *flucht* Tools->Optionen->Bibliothek(Win32) oder Bibliothek(.Net) und von da an wie oben.

Money Making Machinist 25. Mai 2005 20:53

Re: GraphicEx installieren
 
Also Bibliothekpfad hab ich nun drin, aber jetzt häng ich wieder. wo genau muss den des Define hin?
In der GraphicEx.pas hab ich "{$ifdef PortableNetworkGraphic}" gefunden. Stimmt das so?

DGL-luke 25. Mai 2005 21:46

Re: GraphicEx installieren
 
das define kommt am besten direkt über die implementation hin. da sieht man sie schön.
also:

Delphi-Quellcode:
{$define PortableNetworksGraphic}

implementation
//..........

SonicTTH 18. Dez 2008 12:52

Re: GraphicEx installieren
 
Hallo,

Das is sehr schön wie das hier erklärt wurde, aber wie kann ich jetzt eine PNG grafik verwenden? beim TImage die Picture Komponente gehn png grafiken nicht auszuwählen.

Ich habs genau so gemacht wie hier beschrieben... was mach ich falsch?

Larsi 18. Dez 2008 12:58

Re: GraphicEx installieren
 
http://www.delphipraxis.net/internal...t.php?t=122568


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:21 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz