Comments (19)
Thank you for the code. I will try it at once.
Yes, I am prepared to give it another go, of course.
from image32.
Yes, test successful here too. Bravo!
from image32.
Applied your patch. Error solved.
Next problem here:
// Img32.pas
function HslToRgb(hslColor: THsl): TColor32;
// ...
begin
// ...
x := c * (255 - abs((hsl.hue mod 85) * 6 - 255)) div 255; // <--- "Can't determine which overloaded function to call"
I solved it like this:
var
//...
c, x, m, a: Integer;
begin
// ...
a := (hsl.hue mod 85) * 6 - 255;
x := c * (255 - abs(a)) div 255;
from image32.
Hopefully these latest 2 commits help. ðĪð.
from image32.
Next problem (sorry). :)
No, it's me that's sorry.
Thanks for your patience and thanks for your help too.
I'll try and fix it tonight, but it's close to my bedtime, so unless I find the fix quickly, I'll attend to it tomorrow morning.
Yep, sadly that won't be an easy fix (for Linux).
More info here: https://wiki.freepascal.org/High_DPI#Lazarus_DPI_related_properties
I'll see what I can do tomorrow morning. Cheers.
from image32.
When you have solved the bug, you should remember how it was done, and keep it as special effect. :)
Actually it's not unlike an interim image in cleartype construction where text is stretched out into red green and blue stripes before it's de-stretched.
from image32.
I'm hoping the latest changes I've just pushed to the repository will fix the above issues.
However, unrelated to Linux, I'm aware that resizing the SVG in this Demo App can on occasions cause exceptions that I'm investigating, but confident it'll be an easy fix.
from image32.
Yes it works (and looks very nice).
from image32.
Yay! And thank you for all your helpful feedback.
from image32.
However, unrelated to Linux, I'm aware that resizing the SVG in this Demo App can on occasions cause exceptions that I'm investigating, but confident it'll be an easy fix.
Found and fixed (in the latest repository commit).
from image32.
Bonjour Roland.
Yes, I need to update the uses
clause in main.pas.
The reference to Img32.Clipper
should be changed to Img32.Clipper2
.
The demo then compiles without any further issues for me (using Lazarus 2.0.12, FPC 3.2.0).
I'll try to update the repository soon.
Edit: Sorry, that was compiling on Windows. I don't have a Linux PC to test but I'll do a bit of research.
from image32.
Thank you for your answer.
There are other problems. I could fix some of them, but not all. I wonder if the library, in its current state, is compatible with Linux. I see several things that are Windows-only.
I believe that we can close the issue? I will give another try to the demo when I have a Windows computer under the hand.
Regards.
Roland
from image32.
There are other problems. I could fix some of them, but not all.
OK, I'm sorry to hear that, though I'm keen to know what they are/were.
And I'll certainly understand if you don't want to persist.
But if you're prepared to give it another go here's a likely fix:
In Img32.pas
(in lines 112 and following)
TInterfacedObj = class(TObject, IInterface)
public
{$IFDEF FPC}
function _AddRef: Integer;
{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
function _Release: Integer;
{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
function QueryInterface(
{$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} iid : tguid;
out obj) : longint;
{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
{$ELSE}
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
{$ENDIF}
end;
(and lines ~3300 and following)
{$IFDEF FPC}
function TInterfacedObj._AddRef: Integer;
{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
begin
Result := -1;
end;
//------------------------------------------------------------------------------
function TInterfacedObj._Release: Integer;
{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
begin
Result := -1;
end;
//------------------------------------------------------------------------------
function TInterfacedObj.QueryInterface(
{$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} iid : tguid;
out obj) : longint;
begin
if GetInterface(IID, Obj) then Result := 0
else Result := E_NOINTERFACE;
end;
{$ELSE}
function TInterfacedObj._AddRef: Integer; stdcall;
begin
Result := -1;
end;
//------------------------------------------------------------------------------
function TInterfacedObj._Release: Integer; stdcall;
begin
Result := -1;
end;
//------------------------------------------------------------------------------
function TInterfacedObj.QueryInterface(const IID: TGUID;
out Obj): HResult;
begin
if GetInterface(IID, Obj) then Result := 0
else Result := E_NOINTERFACE;
end;
{$ENDIF}
I wonder if the library, in its current state, is compatible with Linux. I see several things that are Windows-only.
I'm hoping it is Linux compatible though, as I've said above, I don't currently have linux installed to test it.
I believe that we can close the issue?
I will if you don't wish to continue.
from image32.
Next problem. Lazarus tries to compile Img32.FMX.pas.
I noticed this line:
// Img32.Layers.pas, line 469
{$IFNDEF MSWINDOWS} uses Img32.FMX;{$ENDIF}
I tried this:
{$IFNDEF FPC}{$IFNDEF MSWINDOWS} uses Img32.FMX;{$ENDIF}{$ENDIF}
But the compiler still tries to compile Img32.FMX. I will continue to investigate.
from image32.
Thank you for the two commits.
Next problem (sorry). :)
main.pas(119,47) Error: Identifier not found "DpiAware"
main.pas(129,29) Error: Identifier not found "DPIAware"
main.pas(279,23) Error: Identifier idents no member "CopyToDc"
from image32.
I've updated and greatly simplified the Lazarus demo (see repository) and I'm hoping it'll now compile in Linux too. The only thing I'm slightly concerned about is whether TBitmap.Scanline
is supported in Linux.
Edit: Deleted zip file and updated repository.
from image32.
Thank you for your work and congratulations. It compiles and works!
I had to do this correction (img32.pas lines 2686 and 2713):
pxDst := {img}self.PixelRow[i];
I had to remove these three lines in main.pas, line 55:
{$IFNDEF MSWINDOWS}
//bkColor := SwapRedBlue(bkColor);
//penColor := SwapRedBlue(penColor);
//txtColor := SwapRedBlue(txtColor);
{$ENDIF}
That's all!
I have the impression that the result on the screen is not what it should be, but in any case it is pretty. :)
from image32.
have the impression that the result on the screen is not what it should be,
LOL, no! ððĪŠ. But I'm encouraged that we're close. ð
from image32.
Old televisions used to look like that sometimes when they were not correctly adjusted. :)
When you have solved the bug, you should remember how it was done, and keep it as special effect. :)
from image32.
Related Issues (20)
- Refresh Bug - Layer 301 example HOT 4
- Glitch when resizing TBitmap HOT 13
- rotate(270) does not adjust with and height for viewport and image when rendering HOT 1
- How to CopyFromBitmap and CopyToBitmap on Lazarus? HOT 8
- Wrong Encoding Detection when file has no BOM
- TImageFormat_QOI.SaveToStream declaration error
- Delphi 12 Packages
- Typos in Package HOT 2
- Layered images on top of a TPanel HOT 1
- SetRoundMode should be used with try/finally
- [Feature Request] A flag to enable/disable CropTransparentPixels
- SetRoundMode should not be used at all ;) HOT 13
- Issues when building Mac Os 64 Bit HOT 10
- (out of topic) Simple Sudoku HOT 2
- FR: SVG Image element HOT 7
- Png file shows only part of the SVG file HOT 4
- BicubicResample() and tiny height HOT 4
- Delphi 12.1 compilation for IOS and Android error HOT 1
- Wrong colors HOT 2
- [dcc64 Error] Unit1.pas(216): E2003 Undeclared identifier: 'InterpolatePoints' when complie Vectorize demo 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 image32.