Recent

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

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #705 on: November 16, 2014, 02:40:00 am »
Oh I see. I had the same problem. It is because TUtf8Char is defined in two different units. I have the impression that when I fix it, it gets reverted. Maybe because it is automatically generated code. The temporary fix I found is to add "LCLType." before the type name so that it looks in the right unit. You can use Ctrl-Click to see if it is the same type in the interface and in the implementation, and where it points to otherwise.
Conscience is the debugger of the mind

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #706 on: November 23, 2014, 09:33:38 pm »
Version in SVN still does not work. Where am I to add LCLType? It is already in the USES. I edite the LFM manually, but in vain :(
But, what brought me here now- how am I to resample a layer, or there is no such feature yet?
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #707 on: November 23, 2014, 10:44:26 pm »
When adding "LCLType." you get something like this:
Code: [Select]
procedure TFMain.FormUTF8KeyPress(Sender: TObject; var UTF8Key: LCLType.TUTF8Char);
Nope, there is no feature to resample a particular layer. But you can stretch it using the perspective tool. By holding ALT, you get a rectangle that you can resize.
Conscience is the debugger of the mind

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #708 on: November 24, 2014, 04:34:07 pm »
When adding "LCLType." you get something like this:
Code: [Select]
procedure TFMain.FormUTF8KeyPress(Sender: TObject; var UTF8Key: LCLType.TUTF8Char);

Ahh, it compiles now. But why don't you apply it in the SVN?


Nope, there is no feature to resample a particular layer. But you can stretch it using the perspective tool. By holding ALT, you get a rectangle that you can resize.
I miss the Layer entry in the main menu. Does it sound reasonable to you to add it?

Also, I'd like to discuss adding dragging and dropping folders in LazPaint:
- A folder is likely to contain many files. I doubt s.o. would like to add Layers this way.
- A dialog with three buttons: (1)Add files to image list (2) Add files to image list (recursively) and (3)Cancel seem to me a proper solution.
Another way is to have two buttons  (1)Add files to image list and (2)Cancel plus a checkbox Add recursively  but it would require a custom dialogue form.
What do you think?
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #709 on: November 27, 2014, 03:12:20 pm »
When adding "LCLType." you get something like this:
Code: [Select]
procedure TFMain.FormUTF8KeyPress(Sender: TObject; var UTF8Key: LCLType.TUTF8Char);

Ahh, it compiles now. But why don't you apply it in the SVN?
I suppose Lazarus removes it before I commit changes to the repository. Also in the last version, it does not seem necessary.

Here, I have updated the repository with "LCLType." if that may help.

Well, it could be possible to add a layer menu, but there are already many menus. I plan to make menus customisable, so that it would be easy to add it.

About drag'n'dropping folders, why not. About creating a new form with a checkbox, I think it would be easier to understand because the label could be "add subfolders recursively" and anyway the custom dialog of lazarus is buggy so it would be good to have a specific form instead. I think we can keep the "add layers" option in it, and so this form would be shown in all cases. The checkbox would be hidden if it is not a directory.
Conscience is the debugger of the mind

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #710 on: November 29, 2014, 07:28:19 am »
When adding "LCLType." you get something like this:
Code: [Select]
procedure TFMain.FormUTF8KeyPress(Sender: TObject; var UTF8Key: LCLType.TUTF8Char);

Ahh, it compiles now. But why don't you apply it in the SVN?
I suppose Lazarus removes it before I commit changes to the repository. Also in the last version, it does not seem necessary.
 

So after all, it' a bug in the current version of Lazarus?

Well, it could be possible to add a layer menu, but there are already many menus. I plan to make menus customisable, so that it would be easy to add it.
 

I'd rather unite Filter and Render and Edit and Select, because they seem to me functionally close. Select is after all a part of Edit. Well, customizable menus are always a plus.

About drag'n'dropping folders, why not. About creating a new form with a checkbox, I think it would be easier to understand because the label could be "add subfolders recursively" and anyway the custom dialog of lazarus is buggy so it would be good to have a specific form instead. I think we can keep the "add layers" option in it, and so this form would be shown in all cases. The checkbox would be hidden if it is not a directory.
I hope I will be able to start working on that after 17.XII.
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #711 on: November 29, 2014, 11:14:17 am »
So after all, it' a bug in the current version of Lazarus?
I don't know, I am a bit confused about what is happening with that.  %)

Quote
I'd rather unite Filter and Render and Edit and Select, because they seem to me functionally close. Select is after all a part of Edit.
It is a good point.

Quote
Well, customizable menus are always a plus.
Yep.  8)

Quote
I hope I will be able to start working on that after 17.XII.
Ok.  :)
Conscience is the debugger of the mind

kealon

  • New member
  • *
  • Posts: 5
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #712 on: December 03, 2014, 07:12:45 am »
Good day
Some not true in TBGRAGradientTriangleScanner (attached image 1.png)

Left with bellow equation, Right - original

expression easier  (attached image image001.png)

BGRABitmap v7.5

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #713 on: December 05, 2014, 04:07:43 pm »
I suppose there is a difference because TBGRAGradientTriangleScanner takes gamma correction into account, hence there is less dark area.

Note: for readability, please create a separate thread when raising a specific subject.
Conscience is the debugger of the mind

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #714 on: January 14, 2015, 08:46:01 am »
I have started making a modified QuestionDialog, based on the one of Lazarus.
It occurred to be more time consuming than I expected, since I have to find all components used bu Lazarus. Probably I will have to unite them, clean what is not needed etc.
Modification that I intend to make to  QuestionDialog are:
1. Add a property to disable icons on buttons.
2. Add a popup menu, containing "Copy message to clipboard" which will be very useful for reporting errors. My initial idea was to use a Memo to show the message, but it occurs that getting rid of the blinking cursor will take some more time.
3. Add support for a checkbox. My idea is that one of the first bits of the result should be set to 1 if the checkbox is checked.
Do you think that one checkbox is enough? I could add more than one but I wonder if a second one would be ever needed.

Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #715 on: February 06, 2015, 10:15:45 am »
 I just tried to select a rectangular area in an image created from the buffer and I got a "division by zero" error. I restarted Lazpint and I got the same error.
Have you come across this bug, I shall try to investigate it myself?
EDIT: I updated the svn and with the new build the problem does not exist.
« Last Edit: February 14, 2015, 09:07:50 pm by CM630 »
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

CM630

  • Hero Member
  • *****
  • Posts: 922
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #716 on: February 20, 2015, 09:50:02 am »
Not to forget- I started adding text to an image, but I cannot type +, because typing it zooms the image. I will check if this is not fixed in a later version.
Лазар 2,0,10; W10 or W7 64bit; FPC3,2,0; rev 63526

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #717 on: April 02, 2015, 04:26:56 pm »
Hello folks,

Here is a new version of LazPaint 6.4 with some fixes and the following new features:
- Loading 3d models with texture (two example models are provided)
- Added "brush tool": you can specify the shape of the brush, load it from a file
- Added "clone tool": right click to set source location, and left click to duplicate
- Added palette toolbar: load/save palettes in various formats, posterize or dither image
- In color window: add color to the palette, preview of current color
- Less toolbars by default: right-click on top-left toolbar to add/remove toolbars
- Toolbox is docking inside the main window (left or right side)
- Save file as PNG/JPG/BMP: choose color depth and preview image & file size
- Added "rain" rendering (menu Render)

Please test and compile for your platform! Dont forget to get latest version of BGRABitmap (8.1).

Source code:
http://sourceforge.net/projects/lazpaint/files/src/lazpaint6.4.1_src.zip/download
http://sourceforge.net/projects/lazpaint/files/src/bgrabitmap8.1.zip/download

Binaries:
http://sourceforge.net/projects/lazpaint/files/bin/lazpaint6.4.1_win32.zip/download
http://sourceforge.net/projects/lazpaint/files/bin/lazpaint6.4.1_win64.zip/download
http://sourceforge.net/projects/lazpaint/files/bin/lazpaint6.4.1_setup_win32_win64.exe/download
http://sourceforge.net/projects/lazpaint/files/bin/lazpaint6.4.1_linux32.tar.gz/download

EDIT: the code would not compile because of type interference of TUTF8Char. This is fixed on SVN and in the zip files.
EDIT: applied some fixes for linux version
EDIT: some fixes so now it is version 6.4.1. Also there are some problems with Mac version: http://forum.lazarus.freepascal.org/index.php/topic,12037.msg173743.html#msg173743
« Last Edit: April 06, 2015, 10:44:34 pm by circular »
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #718 on: April 02, 2015, 04:29:13 pm »
I just tried to select a rectangular area in an image created from the buffer and I got a "division by zero" error. I restarted Lazpint and I got the same error.
Have you come across this bug, I shall try to investigate it myself?
EDIT: I updated the svn and with the new build the problem does not exist.
Yes it is fixed.

Not to forget- I started adding text to an image, but I cannot type +, because typing it zooms the image. I will check if this is not fixed in a later version.
It is fixed as well.

Do you think that one checkbox is enough? I could add more than one but I wonder if a second one would be ever needed.
I would say that if more checkboxes are necessary, chances that a whole special window is necessary.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #719 on: April 02, 2015, 11:13:18 pm »
Hi, There is a problem compiling:

ubrowseimages line 393

Code: [Select]
ubrowseimages.pas(393,26) Error: function header doesn't match any method of this class "TFBrowseImages.FormUTF8KeyPress(TObject,var TUtf8Char);"

ubrowseimages.pas(51,15) Hint: Found declaration: TFBrowseImages.FormUTF8KeyPress(TObject,var TUTF8Char);

It's weird because everything seems fine. I have lazarus 1.2.6 32 bit.

I see this:
- When I ctrl-click the "TUTF8Char" that is in the header of the class, it takes me to "LCLType" unit
- When I ctrl-click the "TUTF8Char" that is in the function in the body of the document, it takes me to "Masks" unit

The interface section is using LCLType and the implementation is using Masks.
The type is almost the same, but in Masks is lowercase "TUtf8Char = String[7];". Also in the LCLType there are more conditionals like "$IFDEF USE_UTF8BIDI_LCL"

I moved "Masks" from implementation to interface and now works. You can do ", Masks, LCLType;" or ", LCLType, Masks;". I don't know if this was fixed in Lazarus SVN and the problem exists only in this release version.

 

TinyPortal © 2005-2018