Recent

Author Topic: LazPaint (alpha-blending, antialiasing, filters)  (Read 526451 times)

circular

  • Hero Member
  • *****
  • Posts: 3647
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #690 on: October 15, 2014, 12:00:31 am »
Yes, well it would not be as complicated as Photoshop JSON, however the idea that remains is that parameters need not be simple type like integer or lists or predefined records, but can be made on the fly using JSON syntax. Note that this does not entail a particular base language, it can be Basic-like, C-like or Pascal-like.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3926
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #691 on: October 15, 2014, 03:59:27 am »
Ok it's a dynamic language. The parameters can be constructed "on the fly" (or downloaded from internet, etc)..

circular

  • Hero Member
  • *****
  • Posts: 3647
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #692 on: October 15, 2014, 05:03:11 pm »
It's not necessarily online. By on the fly, I mean that you don't need to define a record type, you can just type the starting { and then values and included other { } inside it.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3926
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #693 on: October 15, 2014, 05:28:53 pm »
I know, like in javascript.
Downloading a json i say as an option...
« Last Edit: October 15, 2014, 05:33:38 pm by 007 »

circular

  • Hero Member
  • *****
  • Posts: 3647
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #694 on: October 15, 2014, 10:37:49 pm »
Yes. I think I misread your post.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3926
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #695 on: October 15, 2014, 11:11:00 pm »
Don't worry. I usually do several reads, because it's in english :)

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #696 on: November 12, 2014, 08:42:38 am »
There is a problem with the LazPaint installer for Win- it requires administrator rights, which are actually not needed, since it does not install anything in the Windows folder.
A patch fixing the problem is attached.
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

lainz

  • Hero Member
  • *****
  • Posts: 3926
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #697 on: November 12, 2014, 10:51:14 am »
In fact it requires administrator privileges to write to registry HKLM: it needs to be written in order to add to "Default Programs" tool. That will not work if written to HKCU.

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #698 on: November 12, 2014, 11:00:49 am »
I just checked the registry entries- if I am not wrong they only register file associations.
I found this article, explaining what to do in such cases.
Maybe a message "Installer cannot create file associations, because it is not started with administrator rights. Restart installer from an administrator account or click "Next" to proceed without creating file associations"? If you are okay with that, I will try to do it.
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

lainz

  • Hero Member
  • *****
  • Posts: 3926
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #699 on: November 12, 2014, 11:15:31 am »
Well, no: it also add data to Default Programs. I know because i'm the initial author of that script.

I suggesetd to use my file association component http://wiki.freepascal.org/FileAssociation
And you can easily check if worked to write HKLM else use HKCU.

Code: [Select]
var
  app: TFileAssociation;
...
// if HKLM doesn't works try HKCU
  if not app.Execute then
  begin
    app.RegisterForAllUsers := False;
    app.Execute;
  end;   

BTW we can just duplicate file association and change HKLM to HKCU in the current script. Just the Default Programs will not work, the other file association will be made the same for the current user only.
« Last Edit: November 12, 2014, 11:32:02 am by 007 »

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #700 on: November 12, 2014, 12:24:25 pm »
Should not LazPaint take care for the associations itself, instead of relying on the installer?
For example this can be done of first start and also it could detect if some associations get „stolen“ by another app.


Btw, I cannot compile it due to:
ubrowseimages.pas(385,26) Error: function header doesn't match any method of this class "TFBrowseImages.FormUTF8KeyPress(TObject,var TUtf8Char);"

Any idea what could be wrong, everything seems okay.
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

lainz

  • Hero Member
  • *****
  • Posts: 3926
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #701 on: November 12, 2014, 04:16:44 pm »
Should not LazPaint take care for the associations itself, instead of relying on the installer?
For example this can be done of first start and also it could detect if some associations get „stolen“ by another app.

Already say that  :)

Quote
I suggesetd to use my file association component http://wiki.freepascal.org/FileAssociation
And you can easily check if worked to write HKLM else use HKCU.

Is not for the installer script, is for the application.

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #702 on: November 13, 2014, 07:39:20 am »
I am not sure that I understand your posts, but finally I got to the idea that you share my opinion:
No registry entries shall be added by the installer, and everything should be done by LazPaint itself? This way the requirement for admin rights in the installer can be removed.


Also- something for my TODO list- when a folder is dropped in LazPaint a open dialologue shall be displayed, just like when dropping multiple files. But... it should have a checkbox for recursive adding.
And some TODO, which I hope that s.o. else will do- LazPaint should have and option Main Menu->Image-> Rotate 180 degrees. But it does not %)


I still cannot get what is the problem with the code which I cannot compile. (me post from yesterday). Seems like a bug in Lazarus?
Edit:  I just added a procedure FormUTF8KeyPress event in a brand new form. No problem!??!
« Last Edit: November 13, 2014, 07:45:06 am by paskal »
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

lainz

  • Hero Member
  • *****
  • Posts: 3926
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #703 on: November 13, 2014, 10:48:43 am »
Yes, that's the idea.

About the error, no idea.

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #704 on: November 15, 2014, 04:10:55 pm »
I just try to compile in a PPC MacOS, Lazarus 2,2. Same problem as on WinXP, Lazarus 2,4.
*Circular, what have you done?
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

 

TinyPortal © 2005-2018