Animated PNG

Anything and everything about programming graphics with Ultibo
develone
Posts: 188
Joined: Wed Dec 28, 2016 7:40 pm
Location: El Paso Tx USA

Re: Animated PNG

Postby develone » Tue May 30, 2017 3:18 pm

Hello All,
These are all of interesting to me. I will help with testing with whatever I can help with.
The GPU fft & jpeg-2000 do take a lot of my time.
Cheers,
pjde
Posts: 252
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: Animated PNG

Postby pjde » Tue May 30, 2017 9:18 pm

Commented out lines 105 & 206 in uCanvas.pas

Removed the line function FT_New_Memory_Face(alibrary: PFT_Library; file_base: pointer; file_size: longint; face_index: integer; var face: PFT_Face) : integer; cdecl; external freetypedll Name 'FT_New_Memory_Face';
That I had added to freetypeh.pp.


Where had you put the FT_New_Memory_Face definition. It should go near where FT_New_Face is defined. Both functions use PFT_Library, PFT_Face and freetypedll.

Regards

Paul
develone
Posts: 188
Joined: Wed Dec 28, 2016 7:40 pm
Location: El Paso Tx USA

Re: Animated PNG

Postby develone » Tue May 30, 2017 10:38 pm

Hello All,

git clone https://github.com/pjde/ultibo-png.git

cd ultibo-png

unzip PNGTest.zip

export PATH=/home/pi/ultibo/core/fpc/bin:$PATH

fpc -B -Tultibo -Parm -CpARMV7A -WpRPI3B @/home/pi/ultibo/core/fpc/bin/rpi3.cfg -O2 PNGTest.lpr
uCanvas.pas(105,10) Error: Identifier not found "FT_New_Memory_Face"
uCanvas.pas(206,10) Error: Identifier not found "FT_New_Memory_Face"
uCanvas.pas(408) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
Error: /home/pi/ultibo/core/fpc/bin/ppcarm returned an error exitcode

cp ultibo/core/fpc/source/packages/fcl-image/src/freetypeh.pp ~/ultibo-png/

pjde wrote
Where had you put the FT_New_Memory_Face definition. It should go near where FT_New_Face is defined. Both functions use PFT_Library, PFT_Face and freetypedll.


Before I had added following interface near the top.

Now I added at line 383 function FT_New_Memory_Face(alibrary: PFT_Library; file_base: pointer; file_size: longint; face_index: integer; var face: PFT_Face) : integer; cdecl; external freetypedll Name 'FT_New_Memory_Face';
to freetypeh.pp

fpc -B -Tultibo -Parm -CpARMV7A -WpRPI3B @/home/pi/ultibo/core/fpc/bin/rpi3.cfg -O2 PNGTest.lpr

No errors.

Should the modified file freetypeh.pp be in the zip?

diff freetypeh.pp ~/ultibo/core/fpc/source/packages/fcl-image/src/freetypeh.pp
383d382
< function FT_New_Memory_Face(alibrary: PFT_Library; file_base: pointer; file_size: longint; face_index: integer; var face: PFT_Face) : integer; cdecl; external freetypedll Name 'FT_New_Memory_Face';
be in the zipfile.
Just curious, why. do you zip things?

Let me know if I can provide anything else.

Cheers,
Attachments
canvas.jpg
canvas.jpg (249.27 KiB) Viewed 161 times
pjde
Posts: 252
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: Animated PNG

Postby pjde » Wed May 31, 2017 2:03 am

Just curious, why. do you zip things?

Sheer laziness.
mark
Posts: 786
Joined: Mon Oct 03, 2016 2:12 am
Location: Indianapolis, US

Re: Animated PNG

Postby mark » Wed May 31, 2017 3:57 pm

develone wrote:Now I added at line 383 function FT_New_Memory_Face(alibrary: PFT_Library; file_base: pointer; file_size: longint; face_index: integer; var face: PFT_Face) : integer; cdecl; external freetypedll Name 'FT_New_Memory_Face';
to freetypeh.pp

fpc -B -Tultibo -Parm -CpARMV7A -WpRPI3B @/home/pi/ultibo/core/fpc/bin/rpi3.cfg -O2 PNGTest.lpr

FYI I added the FT_New_Memory_Face declaration just in front of the implementation line in uCanvas.pas and it worked as expected. I did not need to modify freet pen.pp. Cheers, Mark.

Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 1 guest