Recent

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

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #795 on: May 06, 2016, 03:23:02 am »
I've updated the .LPI project file. Does that fix the dependency?

Yes, it does.

stuartbloom

  • New member
  • *
  • Posts: 8
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #796 on: May 06, 2016, 04:58:20 pm »
Hi, and sorry if this is the wrong place, or infact a silly question.

I have two TBGRABitmap that both contain a similar image (taken from a webcam) that have been masked such that only a certain part of the image remains.

Is there any way to compare these images using lazpaint or will I have to go through both images pixel by pixel. 

Thanks in advance

Stuart

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #797 on: May 06, 2016, 05:31:27 pm »
I think there is no function to do that, but you can access pixels this way:

Code: Pascal  [Select][+][-]
  1. // all pixels //
  2. var
  3.   i: integer;
  4.   p: PBGRAPixel;
  5. begin
  6.   p := Bitmap.Data;
  7.  
  8.   for i := Bitmap.NBPixels-1 downto 0 do
  9.   begin
  10.     p^.red := ;
  11.     p^.green := ;
  12.     p^.blue := ;
  13.     p^.alpha := ;
  14.     Inc(p);
  15.   end;

Code: Pascal  [Select][+][-]
  1. // scan line //
  2. var
  3.   x, y: integer;
  4.   p: PBGRAPixel;
  5. begin
  6.   for y := 0 to Bitmap.Height - 1 do
  7.   begin
  8.     p := Bitmap.Scanline[y];
  9.     for x := 0 to Bitmap.Width - 1 do
  10.     begin
  11.       p^.red := ;
  12.       p^.green := ;
  13.       p^.blue := ;
  14.       p^.alpha := ;
  15.       Inc(p);
  16.     end;
  17.   end;
  18.   Bitmap.InvalidateBitmap;

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #798 on: May 06, 2016, 11:21:02 pm »
I would say it is better to go through all pixels and use the comparison function you want. For example you may use ColorDiff and check if the difference is less than something, to allow for a small variation.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #799 on: May 09, 2016, 05:40:41 pm »
You know that LazPaint, BGRABitmap Tutorial and BGRA Controls (the old Dibo topic) are at the top of views and replies in this forum?

http://forum.lazarus.freepascal.org/index.php?action=stats

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #800 on: May 09, 2016, 07:55:27 pm »
I noticed that there were many views for BGRABitmap. But seeing the statistics it is quite impressive. However many messages are from me as I post regularly when there is a new version of the software.

Looking at the stats, I discovered Android Module Wizard. Seems quite cool!
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #801 on: October 17, 2016, 09:11:47 pm »
I've uploaded the deb package for amd64 tested in Ubuntu 64:
https://github.com/bgrabitmap/lazpaint/releases/tag/v6.4.1

Is the first deb package I made ever, with this tutorial:
https://ubuntuforums.org/showthread.php?t=910717

I finally can compile that LazPaint version  8)

I'm not sure if using x86_64 in architecture part instead of amd64 will work the same, any ideas?
« Last Edit: October 17, 2016, 09:26:28 pm by lainz »

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #802 on: July 04, 2019, 09:15:05 pm »
Hello people,

I know it's been a long time but... a new beta version of LazPaint is ready (version 7.0.1).
https://github.com/bgrabitmap/lazpaint/releases

Binaries not generated yet. Though you can compile it using latest version BGRABitmap 10.2 and of BGRAControls.

There are some issues with the translation files:
https://forum.lazarus.freepascal.org/index.php/topic,45980.0.html

Here is a list of changes.

FILE FORMAT

New support
- ICO/CUR format: it is possible to select a size and also to add/remove an icon size
- GIF format: it is possible to select a frame and also to add/remove frames
- SVG format: loaded as a vectorial layer that can be transformed
- TIFF format: images in L*a*b* can be loaded
- LRS and RES multi-file containers: create, load and save into them

There is new button in the toolbar to choose the image entry (icon size or GIF frame).

Misc
- there are options to remember last save directory and format after closing the app.
- better choice of color depth when saving

DRAWING TOOLS

For now shapes cannot be edited after validation. They are still rasterized.

Improvements of the following tools to allow rotation and transform:
- rectangle
- ellipse
- gradient: can shear the diamond and radial gradients
- phong shape
- text: layout box, paragraph alignment, blur radius in tenth of pixels, better support for Unicode
- selection rectangle
- selection ellipse

Misc:
- finer zoom when holding CTRL key.
- ratio can be specified for selection rectangle/ellipse

LAYERS

New tool: zoom layer.

At the layer level, it is now possible to move, rotate and zoom a layer without rasterizing it. This is true for raster layers and also for SVG layers.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #803 on: July 05, 2019, 01:45:12 am »
Hi, thanks for the new version. I've added binaries for Win32, Win64 (installer and zip file), and as well macOS 64 (bundle in a zip file, including icon and translations).

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #804 on: July 05, 2019, 02:49:07 am »
Thanks  :)

I will try doing the deb files for Linux.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #805 on: July 05, 2019, 01:35:48 pm »
I've added binaries for Linux 64 bit.  :)

Though I am have trouble with cross compiling to Linux 32 bit. When adding a release mode for Linux 32 it says that "/usr/bin/fpc" doesn't support the target i386-linux.

If I try to compile anyway it says:
Error: ppc386 can't be executed, error message: Failed to execute "ppc386", error code: 127

I found a wiki page that apparently explains how to do. I applied that but that doesn't solve the problem.
https://wiki.lazarus.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386
 :'(
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #806 on: July 05, 2019, 05:48:20 pm »
Try with fpcupdeluxe. You can install a separate Lazarus and add cross compilers even for release   version of FPC and lazarus.

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #807 on: July 27, 2019, 10:42:13 pm »
New TEST version of LazPaint 7.0.2
https://github.com/bgrabitmap/lazpaint/releases

Hopefully this version is stable. Please tell me if you find a bug.

Linux 32 and 64 binaries provided

Various fixes:
- bug with selection tool, undo and others
- drawing successive shapes
- scroll bug on Windows
- fixes for future version compatibility

Improvements:
- layer stack: scrolled with mouse wheel, hint on layer kind icon, tool button to rasterize layer
- show layer bounds when transforming it
- better handling of zoomed out layer
- text tool: word wrap does not change with zoom, arabic ligatures and for other scripts, support for unicode non-spacing marks (like added accents/tilde)
- polyline/curve tool: now rendered as vectorial
- faster rendering of shapes in draft mode (while editing)
- switch between fill shape and draw shape mode with one click on selected tool button
- better drive detection on Linux
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #808 on: July 28, 2019, 12:37:49 am »
Thanks for this.

I've added Windows and macOS binaries.


lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #809 on: July 28, 2019, 12:41:48 am »
I've drawn this with LazPaint, with Layers, filters, renders, a lot of tools used.

 

TinyPortal © 2005-2018