Recent

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

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #600 on: July 30, 2014, 03:32:10 pm »
Quote
Still they are not global. So if you have no other solution for item 2,1 I will submit a patch for mine. I will check if I can make shortcuts global.
Yes, they are global. Well I fixed the double handling of the key already.
So, it occurs that these keys work, if the image list panel or the main form is active.
They do not work, if another panel (i.e. Tools) is active. I have no idea if this might be hard to fix.


Also, there is a bug in the image list: when new files are added, if AutoFit (fit zoom) is enabled, the first image, that is automatically open does not get fit.
To fix it, just copy the last line of the OpenImage function after the tbImageClick(nil); line in the AddFiles function. I could send a patch, but I suppose this way would be easier for you.

Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #601 on: July 31, 2014, 06:15:14 pm »
So, it occurs that these keys work, if the image list panel or the main form is active.
They do not work, if another panel (i.e. Tools) is active. I have no idea if this might be hard to fix.
Oh I get it. Well when the mouse is moved over the main window, this one becomes active, so it is not a big problem.

Quote
Also, there is a bug in the image list: when new files are added, if AutoFit (fit zoom) is enabled, the first image, that is automatically open does not get fit.
To fix it, just copy the last line of the OpenImage function after the tbImageClick(nil); line in the AddFiles function. I could send a patch, but I suppose this way would be easier for you.
I don't seem to have this problem. If there are no files in the list then it works, and if there are already files in the list, then the first added image is not opened.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #602 on: July 31, 2014, 06:39:12 pm »
Hello people,

It seems version 6.0 is ready. Now I need some help to make binaries of the program.

Here are all the zip files:
http://sourceforge.net/projects/lazpaint/files/src/lazpaint6.0_src.zip/download
http://sourceforge.net/projects/lazpaint/files/src/bgrabitmap7.6.zip/download
http://sourceforge.net/projects/bgra-controls/files/bgra-controls-3.0/bgra-controls-3.2-20140421.7z/download
http://sourceforge.net/projects/lazpaint/files/src/inet0.6.6.zip/download

I can do win32 binaries and linux32 binaries, but I cannot do:
- win64 binaries: done by Leledumbo
- linux64 binaries: done by Leledumbo
- MacOS binaries

About MacOS binaries, you can take a look at a previous archive to see the structure it is supposed to have. There are some special requirements for the directories.

Cheers
« Last Edit: August 01, 2014, 01:29:10 am by circular »
Conscience is the debugger of the mind

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #603 on: July 31, 2014, 10:46:42 pm »
win64 (native win32) & linux64 binaries (gtk2 + qt) uploaded

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #604 on: August 01, 2014, 01:26:30 am »
Thank you very much Leledumbo.
Conscience is the debugger of the mind

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #605 on: August 04, 2014, 09:41:34 am »
Quote
Also, there is a bug in the image list: when new files are added, if AutoFit (fit zoom) is enabled, the first image, that is automatically open does not get fit.
To fix it, just copy the last line of the OpenImage function after the tbImageClick(nil); line in the AddFiles function. I could send a patch, but I suppose this way would be easier for you.
I don't seem to have this problem. If there are no files in the list then it works, and if there are already files in the list, then the first added image is not opened.
I do not mean opening/not opening of the image, but autozooming it. Anyway, I will submit a patch for that, together with some other stuff.I'd like to discuss some other issues:

1. I came across the following issue: when I select an area , then invert selection,  it is possible to do Crop to selection. What actually happens is that the initially selected area is deleted. I do wonder if in such cases Crop to selection should not be disabled?

I tried Gimp (an old version) , in the same case Cropping does not get disabled, and yet it does nothing when selected. Maybe someone can tell how Photoshop behaves?

2. When Save As is selected from the menu, the default filter shown is All file types (*.*).

Actually if no extension is written, the file is save as BMP.
IMHO, default extension should be the one of the edited file itself. Anyway if it stays BMP, then it would be much better if instead of  All file types (*.*), to show Bitmap (*.bmp). What to you think?
I can take care for that issue.

3. I'd like to ask @Circular, if he has plans when the next version of LazPiant shall be released?
« Last Edit: August 04, 2014, 10:38:34 am by paskal »
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #606 on: August 04, 2014, 03:16:07 pm »
I do not mean opening/not opening of the image, but autozooming it. Anyway, I will submit a patch for that, together with some other stuff.
Maybe I will understand better what you want to say with the patch.

Quote
1. I came across the following issue: when I select an area , then invert selection,  it is possible to do Crop to selection. What actually happens is that the initially selected area is deleted. I do wonder if in such cases Crop to selection should not be disabled?

I tried Gimp (an old version) , in the same case Cropping does not get disabled, and yet it does nothing when selected. Maybe someone can tell how Photoshop behaves?
Personally I think it is a good thing that the non selected area is deleted in this case.

Quote
2. When Save As is selected from the menu, the default filter shown is All file types (*.*).

Actually if no extension is written, the file is save as BMP.
Nope it is PNG.

Quote
IMHO, default extension should be the one of the edited file itself. Anyway if it stays BMP, then it would be much better if instead of  All file types (*.*), to show Bitmap (*.bmp). What to you think?
I can take care for that issue.
Currently the default extension is PNG. In the dialog box, I think it is ok that the format is not defined. I think that then when we save, the default format should be PNG if there is no layer and LZP if there are layers.

If there is any the current extension of the file, it is a good idea to set this as the extension in the dialog box, unless it is already set to something. For example, we can open a series of file in BMP format and save them in TIFF, and I would not want to change to TIFF extension each time I do "save as".

Quote
3. I'd like to ask @Circular, if he has plans when the next version of LazPaint shall be released?
I am waiting to have more feedback to know if there are quick fixes to apply in priority. Until now, there does not seem to by any serious issue, so I guess we can soon start to progress towards a new version. A new version may be released in December for example. There is no hurry as the published version seems satisfactory. It depends also if we have much ideas and time to do it.

I have already noted the following things to do in the next version:
- reduce zoom if the image is too big when opening with File > Open
- add more filters
- save image browser size in configuration
- take into account DPI resolution of images
- display somewhere information about the image (size, number of colors)
- correct a bug when typing the size of the brush
- make it easier to change brush size and text size
- propose quick colours that have been used recently
- fix a bug with 3d rendering (normal vector becoming zero)
- handle custom normals for vertices

Cheers
Conscience is the debugger of the mind

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #607 on: August 04, 2014, 03:52:14 pm »
Quote
1. I came across the following issue: when I select an area , then invert selection,  it is possible to do Crop to selection. What actually happens is that the initially selected area is deleted. I do wonder if in such cases Crop to selection should not be disabled?

I tried Gimp (an old version) , in the same case Cropping does not get disabled, and yet it does nothing when selected. Maybe someone can tell how Photoshop behaves?
Personally I think it is a good thing that the non selected area is deleted in this case.
 


Well, it sort of duplicates Delete function, yet it might be useful. Maybe a different name shall be given to this activity?


 

Quote
2. When Save As is selected from the menu, the default filter shown is All file types (*.*).

Actually if no extension is written, the file is save as BMP.
Nope it is PNG.
Quote
IMHO, default extension should be the one of the edited file itself. Anyway if it stays BMP, then it would be much better if instead of  All file types (*.*), to show Bitmap (*.bmp). What to you think?

I can take care for that issue.
Currently the default extension is PNG. In the dialog box, I think it is ok that the format is not defined.
So how are users supposed to know that default extension is PNG? There is an option to use filtering like PNG|*.*|JPG|*.*...
This way all files shall be seen, but users would know what extension is supposed to be added.
 

I think that then when we save, the default format should be PNG if there is no layer and LZP if there are layers.

 

Indeed, other formats do not support transparency. But, I can tell for myself that most of the time I do not need transparency and it is quite problematic, because I have to keep filling it with colour. So I would not like to save a JPG as a PNG and vice versa.
I read somewhere that you prefer an application without a settings dialogues, but maybe LazPaint became too big to do without it.
 

If there is any the current extension of the file, it is a good idea to set this as the extension in the dialog box, unless it is already set to something. For example, we can open a series of file in BMP format and save them in TIFF, and I would not want to change to TIFF extension each time I do "save as".
 


I see the point. So there might be a checkbox to set extension permanently (for the session) to the new value. But that means that a custom SaveDialog shallbe used, which sounds like a lot of time.
Generally in this case I proceed with batch processing- convert everything in the output format and then edit it.
 

Quote
3. I'd like to ask @Circular, if he has plans when the next version of LazPaint shall be released?

I am waiting to have more feedback to know if there are quick fixes to apply in priority.I have already noted the following things to do in the next version:

...
I would like to ask if working in a transparencyless mode could take less resources (mempory, CPU, etc). And how hard it would be to do implement it?
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #608 on: August 04, 2014, 04:52:33 pm »
Well, it sort of duplicates Delete function, yet it might be useful. Maybe a different name shall be given to this activity?
Well no because if the border is not selected, the image is reduced.

Quote
So how are users supposed to know that default extension is PNG? There is an option to use filtering like PNG|*.*|JPG|*.*...
This way all files shall be seen, but users would know what extension is supposed to be added.
If the user do not care what extension to give, then we can give any extension, and so use the most reasonable format according to us.

Quote
But, I can tell for myself that most of the time I do not need transparency and it is quite problematic, because I have to keep filling it with colour. So I would not like to save a JPG as a PNG and vice versa.
Of course, if you select JPG, it is saved as JPG, not PNG. However JPG is lossy, so even for an opaque image, I would not recommend it unless you have the intention to give a small file to someone else for example.

Quote
I read somewhere that you prefer an application without a settings dialogues, but maybe LazPaint became too big to do without it.
Yes. If we have different opinions on how the application should behave, we can put it in configuration as a choice.

Quote
So there might be a checkbox to set extension permanently (for the session) to the new value. But that means that a custom SaveDialog shallbe used, which sounds like a lot of time.
Well, yeah no I don't want to do a custom SaveDialog.

Quote
Generally in this case I proceed with batch processing- convert everything in the output format and then edit it.
Yes I understand, however it takes some time to set up a batch processing if you just have a few files.

Quote
I would like to ask if working in a transparencyless mode could take less resources (mempory, CPU, etc). And how hard it would be to do implement it?
No currently it would not be a significant optimisation. And in fact, you don't need a transparencyless mode. You can fill the background with a color. If you still want to use the eraser, you can add a background layer with the color of the background (or an image if you like).
Conscience is the debugger of the mind

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #609 on: August 05, 2014, 07:59:54 am »
Quote
I read somewhere that you prefer an application without a settings dialogues, but maybe LazPaint became too big to do without it.
Yes. If we have different opinions on how the application should behave, we can put it in configuration as a choice.
 
It should rather be if users have different opinions how the application should behave. Oddly, LazPaint was downloaded more than 2000 times this week (it still Tuesday), and there is no user feedback here. Maybe there is a discussion on somewhere else?
Quote
Generally in this case I proceed with batch processing- convert everything in the output format and then edit it.

 

Yes I understand, however it takes some time to set up a batch processing if you just have a few files.
 


I usually have a hundred at least :)
Quote
I would like to ask if working in a transparencyless mode could take less resources (memory, CPU, etc). And how hard it would be to do implement it?
No currently it would not be a significant optimisation. And in fact, you don't need a transparencyless mode. You can fill the background with a color. If you still want to use the eraser, you can add a background layer with the color of the background (or an image if you like).

What I usually do is to delete a significant area of the image. Than I have to remove the transparency layer. That's why I have added a keyboard shortcut for Clear alpha channel and set background. But if there was/is a way that deleted area gets the background colour automatically, it would be much easier and probably faster.

Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #610 on: August 05, 2014, 09:52:56 am »
It should rather be if users have different opinions how the application should behave. Oddly, LazPaint was downloaded more than 2000 times this week (it still Tuesday), and there is no user feedback here. Maybe there is a discussion on somewhere else?
Yes it is not easy to get feedback. Some time ago, I was thinking about adding a feedback feature directly in LazPaint.

Quote
What I usually do is to delete a significant area of the image. Than I have to remove the transparency layer. That's why I have added a keyboard shortcut for Clear alpha channel and set background. But if there was/is a way that deleted area gets the background colour automatically, it would be much easier and probably faster.
Would drawing shapes with this background colour not work?

Maybe we can add a function to fill the selection?
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #611 on: August 05, 2014, 12:08:39 pm »
Oh I found a bug: when we choose to move a layer, and then select another layer without moving the first layer, and that the layers do not have the same bounds, then the bounds are not updated.

So we need to do a version 6.1 with bug fixes only or very small changes.
« Last Edit: August 05, 2014, 12:11:08 pm by circular »
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #612 on: August 07, 2014, 07:08:02 pm »
Hello people,

Here is quick update to fix a bug and take recent feedback into account. It is version 6.1. When you help me to compile, think about updating BGRABitmap too (7.7).

Here are all the zip files:
http://sourceforge.net/projects/lazpaint/files/src/lazpaint6.1_src.zip/download
http://sourceforge.net/projects/lazpaint/files/src/bgrabitmap7.7.zip/download
http://sourceforge.net/projects/bgra-controls/files/bgra-controls-3.0/bgra-controls-3.2-20140421.7z/download
http://sourceforge.net/projects/lazpaint/files/src/inet0.6.6.zip/download

Here is the list of changes. Major bug fixes:
- fixed a bug that could corrupt the content of the layer being moved
- fixed a bug with 3d rendering that can almost crash the program when there is no normal vector
- fixed a memory leak with noise filter

Improvements:
- image is zoom out if it is too big when loading
- the image browser size is saved in configuration
- the size of the image is shown in the window title
- fixed bugs when typing in numeric updowns
- added (+)/(-) in the pen preview for easy change of pen size
- added a numeric updown for the size of the text tool
- do not resize icons if dpi of the screen is almost the same as the original
- optimisation of text rendering when it is big
- custom component for numeric updowns in order to add a horizontal bar and to have the same aspect on windows and linux

Linux fixes:
- hide topmost windows when using filters (linux-friendly)
- cursor fix for linux when the mouse is in the toolbars

Here are screenshots of both Windows and Linux version with the custom component for numeric updown:
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #613 on: August 07, 2014, 08:19:25 pm »
I compiled for win32 and linux32. I would need some help for win64 and linux64.

MacOS compilation can wait, we need to first solve a problem with the interface:
http://forum.lazarus.freepascal.org/index.php/topic,25395.msg154179.html#msg154179
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #614 on: August 10, 2014, 05:21:15 am »
I was able to test it on Linux Mint an Zorin OS and I have found some incompatibilities. So I am trying to fix this now...
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018