Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Galfar

Pages: [1] 2 3 4 ... 25
1
Help & Questions / Re: fpc compiler warnings in png decoder
« on: 2 December 2018, 02:23:44 »
Hi,

I think best would be to try PtrUInt and check if there are any problems (loading and saving PNGs is where zlib is ued in Imaging).
Keep in mind that the comment is maybe 20 years old now from the times of Delphi v3 or something like that.

Quick google search found some updated zlib -> Pascal translation where"ptr2int = NativeUInt"  and in FPC "NativeUInt = PtrUInt".
Also when I look where ptr2int is used and to the original C code, it looks it's really just used to do pointer arithmetics in
old Delphi versions.


2
Thanks for the report.
I've just pushed the fix to the repository.
Nice "unusual" files to add to my test image suite :)

3
Bugs And Other Insects / Re: Premultiply and Unpremultiply
« on: 30 November 2018, 23:42:30 »
Thanks, that's indeed a bug.
Just pushed your fix to the repo.

4
Help & Questions / Re: Convert png with transparency to a bitmap
« on: 30 November 2018, 23:37:21 »
Well, if you want to replace just one color (classic color keying) then you can use ReplaceColor function from Imaging.pas unit.
I somehow assumed that by transparency you mean full alpha channel.

5
Thanks for the report, just pushed your fix to the repo.

6
Bugs And Other Insects / Re: RotateImage crash with certain angles
« on: 10 August 2018, 01:49:35 »
Hi,

I've just tested your sample (0->360 degrees) and I've had no crashes
(Lazarus 1.8.4 on Win10, Imaging latest rev. from May 2018, just empty new LCL app).

What versions exactly did you use? Maybe some compiler settings are affecting this?

7
I'm going to update the website with current status in coming days.

Imaging has has repo on Github for some time now: https://github.com/galfar/imaginglib

8
Could you check with the latest version of Imaging? There was a rework of the Lazarus packages in March 2018.

9
Thanks for the tip, looks pretty nice.

10
Help & Questions / Re: Convert png with transparency to a bitmap
« on: 6 February 2018, 03:10:03 »
If I understand it correctly, you need to create one image and fill it with your desired background color. Then load your PNG to another image and draw it over the first image with alpha blending. Finally, save the result to a bitmap. 

11
It's not very different but the the end result does not work yet :( There are crashes that I have not yet figured out.

What works fine in MacOS now is dynamic linking to libtiff like in Linux. It's not enabled by default though
since I guess not many Mac users have libtiff installed (contrary to Linux situation).

12
Suggestions, Feature Requests, Contributions / Re: Thread Safety
« on: 10 November 2017, 00:58:54 »
Hi,

yes the library is not really thread safe -
most of the library core is from 2003 & 2004 with no thread safety in mind.

Of course, it's been sitting in my todo list for a long time now.
There are several suspect places mostly related to image loading and saving,
rest of the library should be quite ok.
What I'm mostly worried about is that used 3rd party libs like OpenJpeg and libtiff
would cause problems.

Anyway, improvements to thread safety are planned but that "time for the library" is still very limited :(




13
Precompiled LibTiff for FPC has been finally added to Imaging for Win32 and Win64.
In Linux it's now using dynamic linking to libtiff since there it's already installed on most systems or simple to install where not.


14
Thanks for the patch, finally applied it.

Imaging now has up to date repos also here:
https://bitbucket.org/galfar/imaginglib
https://github.com/galfar/imaginglib

15
Help & Questions / Re: How to determine image size
« on: 20 March 2015, 16:34:44 »
This would be very helpful but unfortunately is not supported.

For each image format this must be done differently but at least the most common formats (JPEG, PNG) would be nice.


Pages: [1] 2 3 4 ... 25