Layered file formats LZP (read/write): LazPaint file format ORA (read/write): OpenRaster exchange file format PDN (read): Paint.NET images oXo (read): PhoXo images PSD (read flattened): Photoshop images Flat images BMP (read/write): uncompressed bitmaps (including with alpha channel, however many programs do not read the transparency information) GIF (read(write): user can edit a frame if animated ICO/CUR (read/write): icon, user can edit a size JPEG : the well known compression however lossy PCX (read/write) : Personal Computer eXchange PNG (read/write) : Portable Network Graphic TGA (read/write) : also called Targa TIFF (read/write) : not all compression modes are supported WebP (read/write) : Google Web image XPM (read/write) : X PixMap (small C-like format) XWD (read) : X Window Dump (screen capture) DNG, CR2, NEF, ARW... (read) : Raw images from camera Color manipulation Curves : adjust curves of RGBA channels or by hue, luminosity, saturation. Posterize : use a reduced number of values for RGB or for luminosity Colorize : set the color of an image while preserving intensities Shift colors : cycle colors and change colorness (saturation) Complementary colors : use complementary colors without changing the lightness Intensity : make colors lighter or darker without making them white Lightness : make colors lighter or darker by making them whiter Normalize : use the whole range of each color channel and alpha channel Negative : invert colors (with gamma correction) Linear negative : invert colors (without gamma correction) Grayscale : converts colors to grayscale with gamma correction Selection Selection is composed with rectangles, ellipses, polygons, magic wand and pen drawing. It contains levels of transparency, so that the border of an elliptic region has antialiasing. With the left button you can add elements to the selection, and with the right button, you can remove elements from it. The rotation tool allows to rotate the current selection with a free angle. Selection fit option reduces the selection to non transparent pixels. | DPI Aware LazPaint looks the same on high DPI resolutions. It works as well on Retina display and is aware of dark theme. One can change switch to dark theme manually as well. Languages LazPaint is available in the following languages : Arabic, Bulgarian, Chinese, Czech, Dutch, German, English, French, Finnish, Japanese, Kabyle, Latvian, Portuguese, Russian, Spanish and Swedish Filters Radial blur : non directional blur Motion blur : directional blur Custom blur : blur according to a mask Pixelate : fake big pixels Sharpen : makes contours more accute, complementary to Smooth Smooth : softens whole image, complementary to Sharpen Noise : draw random colors and intensities Median : computes the median of colors around each pixel, which softens corners ClearType : add a ClearType effect (displacement of RGB channels) Inverse ClearType : remove a ClearType effect (displacement of RGB channels) Contour : draws contours on a white background (like a pencil drawing) Emboss : draws contours with shadow Shaded map : draw lightened/shaded map use the image as a map of altitudes Sphere : spherical projection Twirl : twirl distortion (like water flowing in hole) Cylinder : cylinder projection Command line LazPaint can be used from the command line to perform a variety of tasks. From converting one image to another, creating a new image from sctratch, or applying filters to an image. Following is a list of some of its commands..... General Commands HorizontalFlip, VerticalFlip, SwapRedBlue, RotateCW RotateCCW, Resample, Opacity, Gradient, New Filter commands You can apply filters with default values. Blur filters : BlurPrecise, BlurRadial, BlurFast, BlurCorona, BlurDisk, BlurMotion, BlurCustom Pixel filters : Sharpen, Smooth, Median, Emboss, Contour, Grayscale, Negative, LinearNegative, Normalize, SmartZoom3 Deformation filters : Sphere, Twirl, Cylinder, Plane Rendering filters : PerlinNoise, CyclicPerlinNoise, Clouds, CustomWater, Water, Wood, WoodVertical, Plastik, MetalFloor, Camouflage, SnowPrint, Stone, RoundStone, Marble |
Bmp.Draw(Canvas,rect(0,0,ClientWidth,ClientHeight),True);
Very nice circular !That's right. I was already thinking about select tool. I would like it to be a kind of mask, with a level from 0 to 255, like a grayscale bitmap.
this is already better than mspaint !
if i can suggest you for the next steps:
- add select tool
- filters apply only on selection
- a script language for custom filters (pascal script or lua) (or be able to use Gimp ones
- filename in titlebar + multiple images open in tabs?
I was trying to manufacture a similar program :D :DI know. If you have an idea to make it faster, it would be welcome.
the Library "bgrabitmap" in ubuntu is slow ..."rather"
# notingI do not understand.
You can change the place of drawing in the window
In the example with the library Unit1.pas / line 274Code: [Select]Bmp.Draw(Canvas,rect(0,0,ClientWidth,ClientHeight),True);
0,0 is The beginning of the drawing in the window
# noting2What error message do you get ?
Can not compile your program linux :'( :'(
I think the problem in "bgrabitmap"
Part of it depends on the freepascal compiler, which does not produce very efficient codeReally? How can you say so?
Because I've looked at the generated asm code. For example, with this Pascal code :QuotePart of it depends on the freepascal compiler, which does not produce very efficient codeReally? How can you say so?
mov SELF,rcx //p := self.Data;
callq GetDataPtr
mov rax, P
mov SELF,rax //n := self.NbPixels-1;
movslq (rax).NBPIXELS,rax
dec rax
mov eax, N
cmpl $00, N //if n<0 then goto @endloop;
jl @endloop
incl N //inc(n);
nop //useless
@iteration:
decl N //dec(n);
mov P,rax //if p^.alpha = 0 then goto @transparent;
movzbl 0x3(rax),eax
test rax,rax //(!) this seems to be wrong, it should test eax
je @transparent
mov P,rax //p^.red := 255-p^.red;
movzbl 0x2(rax),edx
mov $00000000000000FF,rax
sub rdx,rax
mov rax,rdx
mov P,rax
mov dl,0x2(rax)
mov P,rax //p^.green := 255-p^.green;
movzbl 0x1(rax),edx
mov $00000000000000FF,rax
sub rdx,rax
mov rax,rdx
mov P,rax
mov dl,0x1(rax)
mov P,rax //p^.blue := 255-p^.blue;
movzbl (rax),edx
mov $00000000000000FF,rax
sub rdx,rax
mov rax,rdx
mov P,rax
mov dl,(rax)
@transparent:
addq $04, P //inc(p);
cmpl $00, N //if N > 0 then goto @iteration;
jg @iteration
@endloop:
mov SELF,rcx //p := self.Data;
callq GetDataPtr
mov rax, rdi //( p -> rdi )
mov SELF,rax //n := self.NbPixels-1;
movslq (rax).NBPIXELS,rdx
dec rdx //( n -> rdx )
js @endloop //if n<0 then goto @endloop;
xor ecx, ecx
@iteration:
cmp 0x3(rdi),ecl //if p^.alpha = 0 then goto @transparent;
je @transparent
mov P,rax
notb 0x2(rdi) //p^.red := 255-p^.red;
notb 0x1(rdi) //p^.green := 255-p^.green;
notb (rdi) //p^.blue := 255-p^.blue;
@transparent:
add $04, rdi //inc(p);
dec rdx //dec(n);
jns @iteration //if N >= 0 then goto @iteration;
@endloop:
A number of issues on OS X / Carbon:You're right. On Windows too, there are some problems with toolbars, elements get scrambled. But, I wonder what I can do about it. Programming the toolbar myself ?
- See screenshot. Toolbar is rather messed up.
- Once the Colors dialog comes up, then no matter where I click on toolbar, the Colors dialog comes up again.Maybe some other bug with the interface. I guess I cannot do anything about it except by programming it myself.
- Tools dialogs moves after any dialog is displayed.I don't understand.
- Usual sorts of things that one sees in an app that is not optimized for Mac: two Quit menu commands, wrong shortcuts for things like Undo (Cmd+Z, not Ctrl+Z).Ok. What method do you suggest to fix it ?
- Is there no copy and paste support? If so, they should have Edit menu commands.Not yet.
- Seems to be kind of bilingual. Open dialog title is in English, Save dialog title is in French.Ok I fixed it.
When I reposition to Tools dialog, then bring up, say, Open dialog (which hides Tools dialog, it appears), then after Open is dismissed, the Tools dialog moves back to some other position instead of the position I moved it to.Ok. I fixed it.
I haven't looked at it beyond just the UI.Not even click once on the drawing area ?
This could be simplified by the compiler in something likeLooks like an ASMCSE optimization case. Have you enabled that? (not sure about the stability state, but AFAIK it's enabled in -O3 and I've used it and so far no trouble yet, at least in recent version).
procedure WMEraseBkgnd(var Message: TLMEraseBkgnd); message LM_ERASEBKGND;
.......
implementation
.......
procedure TFMain.WMEraseBkgnd(var Message: TLMEraseBkgnd);
begin
// block Erasing background
// inherited EraseBackground(DC);
end;
Because I've looked at the generated asm code. For example, with this Pascal code :QuotePart of it depends on the freepascal compiler, which does not produce very efficient codeReally? How can you say so?
p := Data; for n := NbPixels-1 downto 0 do //iteration begin if p^.alpha <> 0 then begin p^.red := 255-p^.red; p^.green := 255-p^.green; p^.blue := 255-p^.blue; end; //else transparent inc(p); end; //endloop
It gives an assembly code Which can be interpreted as :Code: [Select]mov SELF,rcx //p := self.Data;
callq GetDataPtr
mov rax, P
mov SELF,rax //n := self.NbPixels-1;
movslq (rax).NBPIXELS,rax
dec rax
mov eax, N
cmpl $00, N //if n<0 then goto @endloop;
jl @endloop
incl N //inc(n);
nop //useless
@iteration:
decl N //dec(n);
mov P,rax //if p^.alpha = 0 then goto @transparent;
movzbl 0x3(rax),eax
test rax,rax //(!) this seems to be wrong, it should test eax
je @transparent
mov P,rax //p^.red := 255-p^.red;
movzbl 0x2(rax),edx
mov $00000000000000FF,rax
sub rdx,rax
mov rax,rdx
mov P,rax
mov dl,0x2(rax)
mov P,rax //p^.green := 255-p^.green;
movzbl 0x1(rax),edx
mov $00000000000000FF,rax
sub rdx,rax
mov rax,rdx
mov P,rax
mov dl,0x1(rax)
mov P,rax //p^.blue := 255-p^.blue;
movzbl (rax),edx
mov $00000000000000FF,rax
sub rdx,rax
mov rax,rdx
mov P,rax
mov dl,(rax)
@transparent:
addq $04, P //inc(p);
cmpl $00, N //if N > 0 then goto @iteration;
jg @iteration
@endloop:
This could be simplified by the compiler in something like :
Code: [Select]mov SELF,rcx //p := self.Data;
callq GetDataPtr
mov rax, rdi //( p -> rdi )
mov SELF,rax //n := self.NbPixels-1;
movslq (rax).NBPIXELS,rdx
dec rdx //( n -> rdx )
js @endloop //if n<0 then goto @endloop;
xor ecx, ecx
@iteration:
cmp 0x3(rdi),ecl //if p^.alpha = 0 then goto @transparent;
je @transparent
mov P,rax
notb 0x2(rdi) //p^.red := 255-p^.red;
notb 0x1(rdi) //p^.green := 255-p^.green;
notb (rdi) //p^.blue := 255-p^.blue;
@transparent:
add $04, rdi //inc(p);
dec rdx //dec(n);
jnz @iteration //if N <> 0 then goto @iteration;
@endloop:
unit BGRAGtkBitmap;
....
uses
....
{$IFDEF LCLgtk2}
gdk2, gtk2def, gtk2Proc;
{$ENDIF}
{$IFDEF LCLgtk}
gdk, gtkdef, gtkProc;
{$ENDIF}
What error message do you get ?
bgradefaultbitmap.pas(210,17) Warning: An inherited method is hidden by "TBGRADefaultBitmap.Equals(TBGRADefaultBitmap):Boolean;"
bgragtkbitmap.pas(57,2) Fatal: Can't find unit gtkDef used by BGRAGtkBitmap
A way to avoid flickering.Thanks, it seems to work.
Ok, i've activated all optimizations features. That's better.QuoteThis could be simplified by the compiler in something likeLooks like an ASMCSE optimization case. Have you enabled that? (not sure about the stability state, but AFAIK it's enabled in -O3 and I've used it and so far no trouble yet, at least in recent version).
Gangsterish ;-)Nope, that's totally legal... ;)
1> There is no code in the subversion, it should really be developed thereReally ? On SourceForge, it says that it can be accessed with :
2> No tooltips in the user interface make it hard to guess that items mean. I took some time to figure out what the number near the colors is the alpha. A label near it or a tooltip would help a lot. All buttons and spin controls in the main screen should have tooltipsOk. I've added them.
3> Couldn't compile with the latest Lazarus 0.9.31. I had to apply the following modification:I've done the modifications and uploaded a new version of BGRABitmap on SourceForge.Code: [Select]unit BGRAGtkBitmap;
....
uses
....
{$IFDEF LCLgtk2}
gdk2, gtk2def, gtk2Proc;
{$ENDIF}
{$IFDEF LCLgtk}
gdk, gtkdef, gtkProc;
{$ENDIF}
Gangsterish ;-)If you go to Turbo Pascal or OSDev forum, you'll encounter that more often and that's a normal thing there :P Even some would directly encode the instructions with db/dd/dw.
Really ? On SourceForge, it says that it can be accessed with :
svn co https://lazpaint.svn.sourceforge.net/svnroot/lazpaint lazpaint
I'm working on a local copy, and I publish it when it seems to me ok. I guess it's not the right way. How do you suggest to do that ?
Really ? On SourceForge, it says that it can be accessed with :
svn co https://lazpaint.svn.sourceforge.net/svnroot/lazpaint lazpaint
I'm working on a local copy, and I publish it when it seems to me ok. I guess it's not the right way. How do you suggest to do that ?
The usual way is to do it like this:
svn co https://lazpaint.svn.sourceforge.net/svnroot/lazpaint lazpaint
Then put your code inside lazpaint
Then add all your files:
cd lazpaint
svn add *.lpi *.pas *.lfm *.pp
sometimes you need to set the properties of the files too:
svn propset svn:mime-type text/plain *.lpi *.pas *.lfm
svn propset svn:eol-style native *.lpi *.pas *.lfm
Then commit the changes:
svn commit --message "Initial commit of the code"
Then when I do my own checkout I will get your files.
You can also try to google for: subversion tutorial
If you are using Windows, then install TortoiseSVN
You can look at some of this for ideas about how to optimize it for Mac:I have worked on the toolbar issue. In the next version, it should be better.
http://web.me.com/macpgmr/ObjP/MacXPlatform_Part8.html
I tried it on Windows 7 with 64-bits CPU, but it should work on 32-bits and on Linux.
Here is a new version 1.3, with some improvementsDamn, you move too fast. I haven't even got a chance to try 1.1 :P
Here is the mac render screenshot. (Mac OS X 10.5.8)Thanks.
1. Crosshair is disappear in the image drawing zone.Ok so I should give up with this way of doing the crosshair. I can use a normal cursor, but I do not know how to redefine it. There is a standard crosshair cursor, but it is using inverted pixels, so it is not visible on gray (127 xor 255 = 128). I would like to use a cross hair with black and white. Problem is how to embed it into the exe file and use it inside the application.
P.S. Here I compiled on the Ubuntu 10.10 and crosshair is so slow.
2. Something wrong with the OnPaint event, cos drawing on the canvas nothing happens after changing the form size it appears.Do you mean that while you are drawing, you do not see anything, and the drawing shows up only after you resize the form ? If so, then it explains why you don't see the crosshair. It is painted in the picture like a standard drawing. But I don't understand why this happens.
3. Zoom in and out arent working.I suppose it's the same problem. Maybe it is because direct drawing on Canvas is not possible. In this case, I should put a Repaint even each time the image is drawn.
4. Close can be added to the File menu.Ok.
1. Tools form should be closed and visibility of Tools can be add to the Edit menu or something else.I do not understand. How could the user choose the current tool ? The toolbox is the most convenient way.
2. Information of the x, y points and other related things can be shown at the StatusBar (TStatusBar)Good idea.
Thanks, great job by the way.Thank you, but I wonder what you have seen if it's not painted when you draw...
var
ico : TPicture;
begin
ico:= TPicture.Create;
ico.LoadFromLazarusResource('wi0126-32');
Screen.Cursors[5] := ico.Icon.Handle;
// Screen.Cursor:=5;
Form1.Cursor:=5;
6. 'wi0126-32' is my icon file name in the resource file.I do not understand. How could the user choose the current tool ? The toolbox is the most convenient way.I mean just add in the menu (shortcut) to close and open the tool window.
Thank you, but I wonder what you have seen if it's not painted when you draw...Things can be improved man. :)
I mean just add in the menu (shortcut) to close and open the tool window.Ok.
I hope so. ::)QuoteThank you, but I wonder what you have seen if it's not painted when you draw...Things can be improved man. :)
So the last thing, I am going to test the new version later. (here four oclock in the morning) %)How come ? That's very late. %)
1. Clear the area can be added.What do you mean ? Clear the whole bitmap, or clear the selected area ?
2. There is something wrong with the pen color. For example, when I select the pen color to blue(255) and drawing a rectangle which is red(?).It is possible that red and blue channels are swapped. In this case :
3. Color Dialog can be open like Tools menu, as attached image.You mean a permanent window to choose a color ? Good idea.
4. Minimizing the application to maximization doesnt work.What happens ?
5. Floodfill doesnt work well. (sometimes it fills sometimes doesnt)Strange. Because of the selection ?
Thanks.Thank you too.
What do you mean ? Clear the whole bitmap, or clear the selected area ?Adding an shortcut to clear the bitmap, and a new for appear for the transparency of the cleared bitmap. (opacity, solid)
Is it the case.Yes, it is the case.
You mean a permanent window to choose a color ? Good idea.Yep
What happens ?After minimazing the application, it doesnt come up to the screen again.
Strange. Because of the selection ?No, I think the problem is related with the Tolerance, if the tolerance is bigger than 100, the problem occurs, below it works perfectly.
Some (probably platform specific) problem here. Linux + KDE (Qt 4.7.1).I have no idea what to do about it. Maybe the unit clauses are different with Qt.
Version: 1.4 - ../../../../Lazarus_Qt/lazarus/lcl/menus.pp(454,1) Fatal: Can't find unit Forms used by Menus
(error on compilig)
Version: 1.3 - when resizing Form or when Save menu item selected from mainMenu then SIGSEGV + Can't find "image/qimage.cpp"
this version run (problem with crosshair cursor is probably repaired in 1.4)
I don't now why because I use MainMenu, SaveDialog, resizing etc. in my App. and I never saw these bugs before.
1.I do not understand.QuoteWhat do you mean ? Clear the whole bitmap, or clear the selected area ?Adding an shortcut to clear the bitmap, and a new for appear for the transparency of the cleared bitmap. (opacity, solid)
Yes, it is the case.So there is a Red/Blue inversion. Can you try to replace the following function :
What happens if you try to debug it at this precise moment ?QuoteWhat happens ?After minimazing the application, it doesnt come up to the screen again.
No, I think the problem is related with the Tolerance, if the tolerance is bigger than 100, the problem occurs, below it works perfectly.Ok. I think it is not a bug. The progressive floodfill has a transparency. When tolerance is big, many pixels are filled but with transparency so you may not notice it, all you see is that it paints multiple parts at the same time.
1. Tolerance 0 gives 'Division by zero'Ok. I got this problem too. I'm fixing it.
2. In the New window, have a look at the Cancel button.There is no problem here with this button.
Hello,Ok. How can I know the differences between revision 7 and revision 8 ?
I suddenly can not compile the project anymore. LazPaint revision 10.
Always get: E:\lazarus\lcl\menus.pp(454,1) Fatal: Can't find unit Forms used by Menus
Lazarus 0.9.31 r29477 FPC 2.4.3 i386-win32-win32/win64
Just tested. revision 7 compiled. revision 8 does not.
I do not understand what could be causing this. There is no modifications about Forms or Menus. I guess it is a problem of directories. The only significative change is that I added custom cursors. If you strip ucursors in the last version, what happens ?The error comes from cursors.lrs which is used by LCL Forms unit as well (different cursor.lrs, of course). Renaming it to something else should fix it.
1. Color windows shows the correct color but pen color(Shape_PenColor) does not.Can you explain a little more ?
Can you explain a little more ?When you select the red color in 'color window', it reflects to Shape_PenColor as blue.
For the first changes, but the effect is same. (output is the same as the previous one.)
if (AHeight=0) or (AWidth = 0) then exit;
RawImage.Init;
{$IFDEF DARWIN}
SwapRedBlue;
{$ENDIF}
RawImage.Description.Init_BPP32_B8G8R8_BIO_TTB(AWidth,AHeight);
RawImage.Description.LineOrder:= ALineOrder;
RawImage.Description.LineEnd := rileDWordBoundary;
RawImage.Data:= PByte(AData);
RawImage.DataSize:= AWidth*AHeight*Sizeof(TBGRAPixel);
CreateSuccess := RawImage_CreateBitmaps(RawImage, BitmapHandle, MaskHandle, false);
{$IFDEF DARWIN}
SwapRedBlue;
{$ENDIF}
Here is the trick point maybe this can be show the way.In this cas, clearly the color circle is red-blue swapped.
In the first screenshot (screenshot1) the red picked from the Color Window, but blue is shown. (I pointed with the red circle)
In the second screenshot (screenshot2) the blue picked from the Color Window, but red is shown. (I pointed out with the red circle)
What about blur windows (in Filter menu) ?It would be superb.
It is already there. I was asking if it works on Mac OS.QuoteWhat about blur windows (in Filter menu) ?It would be superb.
Hello Circular,Maybe it is in compiler options (code optimizations and link options may disturb debugger).
I wanted to debug into the Blur methods but it does not stop when I set the breakpoints.
I did once a little performance optimization.What changes do you propose exactly ? Can you post here the resulting code ?
The optimizations is based on the following theory:
A) to "get" a pixel is faster the "set" a pixel.
B) a black pixel can not get darker than black.
So this means from a performance point of view, it make sense to only calculate blur for pixels which are not already black.
procedure ErasePixelInline(dest: PBGRAPixel;
alpha: byte); inline;
var newAlpha: byte;
begin
newAlpha := dest^.alpha * (255-alpha) div 255;
if newAlpha = 0 then dest^:= BGRAPixelTransparent else
dest^.alpha := newAlpha;
end;
function ColorToBGRA(color: TColor): TBGRAPixel; overload;
begin
result.red := color;
result.green := color shr 8;
result.blue := color shr 16;
result.alpha := 255;
end;
In this method a new value for alpha is calculated.I understand. Well, maybe I'll try to optimize the program, but it's not in my priorities, except of course things that do really slow the program in a normal use.
So if dest^.alpha is already 0, then newAlpha will also be 0. There is no need to calculate in this case. It will save you some CPU time.
Another hint: I compiled LazPaint with Compiler switch "Range Check". In this case, LazPaint will fire an "run error 201" in methodThat's right, and it's on purpose. I wanted to avoid the "and 255".Code: [Select]function ColorToBGRA(color: TColor): TBGRAPixel; overload;
begin
result.red := color;
result.green := color shr 8;
result.blue := color shr 16;
result.alpha := 255;
end;
I don't know, is it just me or do I really start seeing another PhotoShop / GIMP alternative but with Paint(.NET) easy drawing capabilities? You're nuts, circular! :PThanks ! :D
I have just tried the new fast release :) and something wrong with the Smart Zoom x3.Hmm... I could not reproduce this problem. Which size is the image at the beggining ?
After doing 2 times "Smart Zoom x3" and one time "Zoom fit", the applications going into the crazy phase. (not response correctly)
Secondly, Under the Colors menu: revise the Colorize(window position different than the other ones)Ok.
Shift Colors, Intensity menus, not renders correctly.Can you send a screenshot ?
Thirdly, After doing Grayscale Tools and Color menus paint themselves again.What do you mean?
P.S. Hide/Unhide looks good. :DCool
QuoteAnother hint: I compiled LazPaint with Compiler switch "Range Check". In this case, LazPaint will fire an "run error 201" in methodThat's right, and it's on purpose. I wanted to avoid the "and 255".Code: [Select]function ColorToBGRA(color: TColor): TBGRAPixel; overload;
begin
result.red := color;
result.green := color shr 8;
result.blue := color shr 16;
result.alpha := 255;
end;
{$PUSH}{$R-}
result.red := color;
result.green := color shr 8;
result.blue := color shr 16;
result.alpha := 255;
{$POP}
I tried Lazpaint in Windows, works perfectly. My congratulations!Cool 8)
But, then i tried in Ubuntu 9.10 (Lazarus 0.9.28.2).I've added some directive on subversion. In fact it should be TGtk2DeviceContext. I guess it's because it's using gtk2 unit, instead of gtk.
I get the message (/usr/lib/lazarus/0.9.28.2/examples/lazpaint1.9/bgrabitmap/bgragtkbitmap.pas(131,38) Error: Identifier not found "TGtkDeviceContext") trying to install Lazpaint.
So better include it in a range check disable directive:Thanks. It's updated.Code: [Select]{$PUSH}{$R-}
result.red := color;
result.green := color shr 8;
result.blue := color shr 16;
result.alpha := 255;
{$POP}
result := TBGRABitmap.Create(Stream);
result := TBGRABitmap.Create;
result.LoadFromStream(Stream);
your progress on LazPaint is incredible! Does your day have more than 24 hours?No, I'm not working full time.
I had to modify the unit <ucliboard>.That's right, I forgot to update BGRABitmap, i've added a create shortcut.
Replaced the line
Code: [Select]result := TBGRABitmap.Create(Stream);
with
Code: [Select]result := TBGRABitmap.Create;
result.LoadFromStream(Stream);
Now I can compile the project.
#0 PUTIMAGE(0x7ffff7feb3a0, 0, 0, 0x7ffff7fead60, DMDRAWWITHTRANSPARENCY) at ../../components/lazpaint/bgrabitmap/bgradefaultbitmap.pas:3016
#1 SLOWDRAWTRANSPARENT(0x7ffff7fead60, 0x7ffff7fead60, 0x7ffff7e43a40, {LEFT = 1, TOP = 1, RIGHT = 33, BOTTOM = 33, TOPLEFT = {X = 1, Y = 1}, BOTTOMRIGHT = {X = 33, Y = 33}}) at ../../components/lazpaint/bgrabitmap/bgragtkbitmap.pas:80
#2 DRAW(0x7ffff7fead60, 0x7ffff7e43a40, 1, 1, false) at ../../components/lazpaint/bgrabitmap/bgragtkbitmap.pas:110
#3 SPEEDBUTTON1PAINT(0x7ffff7fb6590, 0x7ffff7fb7b70) at unit1.pas:40[/quote
Are you need more details? Go deeper?
This same poblem (attachment). I am using TBGRABitmap from LazPaint 2.0Ok, so I suppose that GetImageFromCanvas do not work at all on gtk2. You can check this by drawing something on the form with the normal canvas, then call GetImageFromCanvas with a TBGRABitmap, and then draw it (in opaque mode) somewhere else on the form and see if something is copied.
Could you please save the settings for Dialog "New Image" so it is available again after the restart of LazPaint?Ok. Done.
Very impressive program. I just wanted to say that the lazpaint.compiled and lazpaint.res files do not need to be in the svn repository, as they are generated upon compilation.Ok, thank you. Done.
Strange. Here the manifest is automatically generated. It's just to active themes on XP. What if you do a full compilation ?
Note : i've uploaded again the manifest.
you can add to bgrabitmap or lazpaint some of those gradients? :
http://lazarus.freepascal.org/index.php/topic,12145.0.html
Double Gradient - nGradient
http://wiki.lazarus.freepascal.org/Double_Gradient
Gradient Filler
http://wiki.lazarus.freepascal.org/Gradient_Filler
you can add to bgrabitmap or lazpaint some of those gradients? :
http://lazarus.freepascal.org/index.php/topic,12145.0.html
Double Gradient - nGradient
http://wiki.lazarus.freepascal.org/Double_Gradient
Gradient Filler
http://wiki.lazarus.freepascal.org/Gradient_Filler
The procedure GradientFill that makes gradients (linear, diamond, radial) in a bounding rectangle. I guess you can combine multiple calls to make those gradients. If you write a procedure for this, I can add it easily.
DelphiFreak i've taken your patch into account.
-Add options for default Size imageIt's already the case.
-Increase Undo max number to 100 (at least).Well, with compression, it could be ok.
-Add shortcuts for color & tool window to show/hideOk.
-Add shortcuts for Zooming in/out on the picture Ctrl+MouseWheelOk. Simple MouseWheel to zoom in and out.
Edit: -Save options like Opacity/Light & Foreground and Background colorsOk.
Add support for saving forms' last position, size, and window state before exiting (that would be easy since you already use ini files).Ok.
I wrote about LazPaint in my blog (http://idkn.wordpress.com/2011/03/01/lazpaint/) and some people really liked it, but they wish to have a binary package (in Linux and Windows) because they do not have FPC and Lazarus.Well I can only make Win64 files by myself.
some people really liked it, but they wish to have a binary package (in Linux and Windows) because they do not have FPC and Lazarus.That's easy to handle. I can make binaries for i386-win32, i386-linux (Kubuntu 10.10), and x86_64-win64.
I see that when you set brush alpha to 255 it doesn't draw really smooth line. There is some white lines on it.Can you post a screenshot of this ?
And when you open and press Save As it doesn't remove the extension. :)What sequence of action you do, and what would you expect exaclty?
That's easy to handle. I can make binaries for i386-win32, i386-linux (Kubuntu 10.10), and x86_64-win64.Cool. Can I give you access to Sourceforge repository, or do you know another way?
Here is screenshot from LazPaint with brush paint.Ok, I see what you mean. Unfortunately, I do not know how to solve this perfectly. But I've made it better (on subversion).
http://dl.dropbox.com/u/17084229/lazpaint22.png
About extensions. I simply open file "clouds.pdn" and push Save As PNG image. In Filename I still see the "clouds.pdn" and if I click ok I don't get any image saved. It's not a big bug,just most soft removes it automatically from a filename.Ok, now it removes the extension before showing the dialog if the format is not savable.
Drawing of transparent bitmaps on Gtk window canvas work in this version.It works! Thanks. Your solution should be as default drawing in GTK. Now icons in speedbuttons look very pretty
RequireDerivedFormResource := True;
Ok, i've tried. It works, but the following line must be commented out :See http://wiki.lazarus.freepascal.org/Lazarus_0.99.0_release_notes#TCustomForm.Create_raises_an_exception_if_resource_is_not_foundQuoteRequireDerivedFormResource := True;
What is this line for?
Maybe with a compiler directive can we make a version that works directly on both Lazarus ?
I understand but there was no such line in previous version of Lazarus.AFAIK if you use CreateNew it should compile in all versions...
Application.CreateForm(TFMain, FMain)
I don't know, the line is :QuoteApplication.CreateForm(TFMain, FMain)
IMHO that's the wrong way around... if the main form does not use a 'normal' resource it should be created with CreateNew. In the not too distant future you'll probably have to change it anyway, so why not now?I don't know, the line is :QuoteApplication.CreateForm(TFMain, FMain)
This line is correct. I just commented the "RequireDerivedFormResource := True;" as it's only for the new lazarus, now it should compile on all Lazarus versions
I updated the SVN so you can now compile the testbgrafunc and enjoy demos :)
#0 RAISEGDBEXCEPTION(0xa1c3e0 'TGtk2WidgetSet.CreateBitmapFromRawImage Incompatible BitsPerPixel') at lclproc.pas:1544Have you any idea? This can solve most problems with alpha on lazarus GTK
#1 RAWIMAGE_CREATEBITMAPS(0x7ffff7f86ed0, {DESCRIPTION = {FORMAT = RICFRGBA, WIDTH = 32, HEIGHT = 32, DEPTH = 24, BITORDER = RIBOBITSINORDER, BYTEORDER = RIBOLSBFIRST, LINEORDER = RILOTOPTOBOTTOM, LINEEND = RILEDWORDBOUNDARY, BITSPERPIXEL = 24, REDPREC = 8, REDSHIFT = 16, GREENPREC = 8, GREENSHIFT = 8, BLUEPREC = 8, BLUESHIFT = 0, ALPHAPREC = 0, ALPHASHIFT = 0, MASKBITSPERPIXEL = 0, MASKSHIFT = 0, MASKLINEEND = RILETIGHT, MASKBITORDER = RIBOBITSINORDER, PALETTECOLORCOUNT = 0, PALETTEBITSPERINDEX = 0, PALETTESHIFT = 0, PALETTELINEEND = RILETIGHT, PALETTEBITORDER = RIBOBITSINORDER, PALETTEBYTEORDER = RIBOLSBFIRST}, DATA = 0x7ffff7fbe310 'M' <repeats 39 times>, #255#255#255#255#255#255#255#255#255'M' <repeats 24 times>, #255 <repeats 24 times>, 'M' <repeats 39 times>, #255#255#255'M' <repeats 33 times>, #255 <repeats 21 times>, 'MMMMMMMM'..., DATASIZE = 3072, MASK = 0x0, MASKSIZE = 0, PALETTE = 0x0, PALETTESIZE = 0}, 140737353512256, 0, false) at gtk2/gtk2lclintf.inc:407
#2 RAWIMAGE_CREATEBITMAPS({DESCRIPTION = {FORMAT = RICFRGBA, WIDTH = 32, HEIGHT = 32, DEPTH = 24, BITORDER = RIBOBITSINORDER, BYTEORDER = RIBOLSBFIRST, LINEORDER = RILOTOPTOBOTTOM, LINEEND = RILEDWORDBOUNDARY, BITSPERPIXEL = 24, REDPREC = 8, REDSHIFT = 16, GREENPREC = 8, GREENSHIFT = 8, BLUEPREC = 8, BLUESHIFT = 0, ALPHAPREC = 0, ALPHASHIFT = 0, MASKBITSPERPIXEL = 0, MASKSHIFT = 0, MASKLINEEND = RILETIGHT, MASKBITORDER = RIBOBITSINORDER, PALETTECOLORCOUNT = 0, PALETTEBITSPERINDEX = 0, PALETTESHIFT = 0, PALETTELINEEND = RILETIGHT, PALETTEBITORDER = RIBOBITSINORDER, PALETTEBYTEORDER = RIBOLSBFIRST}, DATA = 0x7ffff7fbe310 'M' <repeats 39 times>, #255#255#255#255#255#255#255#255#255'M' <repeats 24 times>, #255 <repeats 24 times>, 'M' <repeats 39 times>, #255#255#255'M' <repeats 33 times>, #255 <repeats 21 times>, 'MMMMMMMM'..., DATASIZE = 3072, MASK = 0x0, MASKSIZE = 0, PALETTE = 0x0, PALETTESIZE = 0}, 140737353512256, 0, false) at include/lclintf.inc:159
#3 DATADRAWOPAQUE(0x7ffff7feb120, 0x7ffff7e0ce00, {LEFT = 2, TOP = 1, RIGHT = 34, BOTTOM = 33, TOPLEFT = {X = 2, Y = 1}, BOTTOMRIGHT = {X = 34, Y = 33}}, 0x7ffff7fbb950, RILOTOPTOBOTTOM, 32, 32) at ../lazpaint/bgrabitmap/bgradefaultbitmap.pas:3979
#4 DRAW(0x7ffff7feb120, 0x7ffff7e0ce00, 2, 1, true) at ../lazpaint/bgrabitmap/bgradefaultbitmap.pas:1060
#5 DRAW(0x7ffff7e04340, 0x7ffff7e0ce00, 2, 1, 0, GDENORMAL) at bgraimagelist.pas:66
#6 DRAW(0x7ffff7e04340, 0x7ffff7e0ce00, 2, 1, 0, true) at include/imglist.inc:495
#7 PAINT(0x7ffff7fbb530) at include/toolbutton.inc:356
#8 WMPAINT(0x7ffff7fbb530, {MSG = 15, UNUSEDMSG = 32767, DC = 140737352024128, PAINTSTRUCT = 0x0, RESULT = 0}) at include/graphiccontrol.inc:64
#9 SYSTEM_TOBJECT_$__DISPATCH$formal at :0
#10 DESTROY(0x7ffff7fbb530, 0x7fffffffd538) at include/graphiccontrol.inc:46
#11 PERFORM(0x7ffff7fbb530, 15, 140737352024128, 0) at include/control.inc:1083
#12 PAINTCONTROLS(0x7ffff7fbab70, 140737352024128, 0x0) at include/wincontrol.inc:4791
#13 PAINTHANDLER(0x7ffff7fbab70, {MSG = 15, UNUSEDMSG = 0, DC = 140737352024128, PAINTSTRUCT = 0x7ffff7f758e0, RESULT = 0}) at include/wincontrol.inc:4709
#14 WMPAINT(0x7ffff7fbab70, {MSG = 15, UNUSEDMSG = 0, DC = 140737352024128, PAINTSTRUCT = 0x7ffff7f758e0, RESULT = 0}) at include/wincontrol.inc:6560
#15 WMPAINT(0x7ffff7fbab70, {MSG = 15, UNUSEDMSG = 0, DC = 140737352024128, PAINTSTRUCT = 0x7ffff7f758e0, RESULT = 0}) at include/customcontrol.inc:112
#16 SYSTEM_TOBJECT_$__DISPATCH$formal at :0
I've updated Assign function so now it should take transparency into account.Works, thanks.
I don't understand why this error pops up. I tested BGRA drawing on forms and it was working fine. Does the bgrafunctest work on your configuration ?If I draw with Opaque=False then there is no error but it draw without alpha. But you have right that somethin wrong is with compiler defines. I have GTK2 but it uses this block in BGRABitmap unit:
Maybe you are using BGRADefaultBitmap unit instead of BGRABitmap unit. It should not use DataDrawOpaque of TBGRADefaultBitmap but DrawOpaque from TBGRAGtkBitmap instead.
But you are using TBGRABitmap that should redirect to the right implementation. So maybe is there a problem with the $IFDEF.
Definitely it should be distributed as lazarus package. If someone want to include files itself in it's project it can.Ok. I found how to make a runtime package, so it can be used without compiling Lazarus. But, is it necessary to make a design package in order to use it on components ?
But recently I was trying to squeeze bitmap on screen rendering to the max and Drawing to visual component Canvas is fastest method.I don't understand.
I would rather see direct copy internal data to target bitmap rawimage.What code do you suggest ? Which methods would be changed ?
Ok. I found how to make a runtime package, so it can be used without compiling Lazarus. But, is it necessary to make a design package in order to use it on components ?I have no such knowledge about lazarus packages but there is a lot of packages which have no components on components palette (e.g. dcpcrypt, manualdock) so I think this is acceptable practice to create package without components.
Yes, and it works. It's on subversion. But I wonder if I should check "Design and runtime package".I don't know if exists another (better) way to share modules between components like design lazarus package. Maybe someone else could comment here about this. I see it like this: I'm downloading and installing BGRABitmap package like other components. Now I can add this package as requied in my package, so no one can install my package without installing BGRABitmap package first. I can use BGRABitmap units adding them to uses section but I do not have to know path to this units. This same with projects. You could then distribute lazpaint and bgrabitmap like separated projects by adding bgrabitmap package as requied in lazpaint project (project -> project inspector -> requied packages). With this way everyone can easily use power of BGRABitmap without downloading lazpaint. Or I am wrong...
Now, only "Runtime package" is checked so it cannot be compiled into Lazarus. It is faster thus to update. But I do not know what happens if you want to use it with a component.
FabienWang, I checked "release technician" on your account. Does it allow you to upload files ?Nice it works. I didn't know there was a release technician profile :) Thanks
I just updated the SVN,I tested it. Nice work, thanks.
i configured build modes (debug and release) (using stable release 0.9.30)
so if you compile in release you'll get a stripped and optimized binary directly.
(binaries will be out in debug/ or release/ folders) so the main project folder (which is the sources) will stay clean :).
If you have a sourceforge account, you can tell me and I'll add you to the project.It's leledumbo, I've been registered for some years there, but it wasn't easy to manage files (must use svn client, no web interface). Is it easier now? Or how do you want me to give the binaries?
Leledumbo could you provide the following versions:Done:
x86_64-win64
x86_64-qt
i386-qt
Thanks.
Do you mean controls to put in forms ?
Dibo has already done some controls, see here:
http://www.lazarus.freepascal.org/index.php/topic,12411.0.html
Maybe you could explain there what you need.
Do you mean controls to put in forms ?
form1.alphablended := true ;
panel1.alphablended := true ;
Shaped forms can be set with shapeform() method, i do not have finded how to do it with panels.I think I understand what you mean. This way you can put images over other components that are under the panel. I do not know how to do it.
I wish to have a transparent panel so you can see only the object on it (pictures, buttons, etc...)
and you do not see the background-panel.
I think I understand what you mean. This way you can put images over other components that are under the panel. I do not know how to do it.
I suppose it's possible.
Trying 3.5 version, new compile error:
/Developer/lazarus/components/bgrabitmap/bgradnetdeserial.pas(74,14) Error: There is no method in an ancestor class to be overridden: "TDotNetDeserialization.ToString:AnsiString;"
Your truth, my compiler was 2.4.0, now updating it.Trying 3.5 version, new compile error:
/Developer/lazarus/components/bgrabitmap/bgradnetdeserial.pas(74,14) Error: There is no method in an ancestor class to be overridden: "TDotNetDeserialization.ToString:AnsiString;"
Sounds like an old compiler. IIRC tostring was introduced in FPC 2.4.2
and what is the third resample mode? i see only two:ResampleMode indicates only if image is stretched without applying any filter, or by using filter to do a fine resample. The filter is defined by ResampleFilter property.
TResampleMode = (rmSimpleStretch, rmFineResample);
Hmm... So if i set rmSimpleStretch in .Resample it doesn't apply any filter, only Stretching? And if I set rmFineResample (or let it blank to autoset) it will use ResampleFilter in wich rfLinear is the fastest and simpliest and rfCosine is the slowes and the best?and what is the third resample mode? i see only two:ResampleMode indicates only if image is stretched without applying any filter, or by using filter to do a fine resample. The filter is defined by ResampleFilter property.
TResampleMode = (rmSimpleStretch, rmFineResample);
Here is a new version of LazPaint (4.1).
- with embedded version. It means that the program can be included in any LCL application. It is used now in LazPaint itself to edit current texture and custom blur mask. So for example, you can click on the texture (No tex icon), render the texture with the Render menu, validate, and then draw with the chosen texture.
- with better transparency support for clipboard : you can cut'n'paste transparent bitmap parts between LazPaint instances and between LazPaint and Paint.NET.
- with several spline styles : when using spline tool
https://sourceforge.net/projects/lazpaint/files/src/
Done. 8)
Not even true !
Version 4.1 binary for windows is here.
GTK2 version is coming in a few hour (i'm reinstalling my Linux OS).
Well, LazPaint is already a GUI, no ?
I understand. Well, it is possible to add this in LazPaint. For now, I am reorganising the code so you'll have to be patient.
So what are the next features to come in Lazpaint? :)
What if the update checker would get the binaries from sourceforge directly then restart the app :P.
What if we had layers like in Paint.Net (layers is just a group of objects with the same layer index which determine their z-order and you could set a transparency for the whole layer.
What if the update checker would get the binaries from sourceforge directly then restart the app :P.I leave it to you FabienWang...
More effects & of course, as lainz said, an Effect Dialog with preview would be amazing :)What effect for example ?
I leave it to you FabienWang...I'll improve the update checker soon. (when i'll have more time).
QuoteI leave it to you FabienWang...I'll improve the update checker soon. (when i'll have more time).
4.2
4.2,"http://sourceforge.net/projects/lazpaint/files/bin/lazpaint4.2_setup_win32.exe"
Lainz, you've made a po file for translation. How does it work?
@lainz: i've deactivated scaledpi in main form and in toolbox.
i just noticed that tool windows do not have their title anymore. any idea why?
i checked DPI aware application in project option, now I get "error while compiling resources"
by the way, where is the setting or the call to use po files ?
Thanks Lainz.
I've fixed image list size, french translation, and color window size. There is now a ligther syntax for scaleDPI. Lainz, please check the problems you mentionned are solved.
Here is a screenshot.
/lazpaint/bgrabitmap/bgrafilters.pas(206,76) Error: Can't determine which overloaded function to callIn line 206 is:
lazpaint/bgrabitmap/bgrafilters.pas(207,45) Error: Can't determine which overloaded function to call
lazpaint/bgrabitmap/bgrabitmaptypes.pas(238,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(Single,Single,TResampleFilter="0"):<record type>;
lazpaint/bgrabitmap/bgrabitmaptypes.pas(237,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(LongInt,LongInt):<record type>;
lazpaint/bgrabitmap/bgrafilters.pas(211,79) Error: Can't determine which overloaded function to call
lazpaint/bgrabitmap/bgrabitmaptypes.pas(238,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(Single,Single,TResampleFilter="0"):<record type>;
lazpaint/bgrabitmap/bgrabitmaptypes.pas(237,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(LongInt,LongInt):<record type>;
lazpaint/bgrabitmap/bgrafilters.pas(283,58) Error: Can't determine which overloaded function to call
lazpaint/bgrabitmap/bgrabitmaptypes.pas(238,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(Single,Single,TResampleFilter="0"):<record type>;
lazpaint/bgrabitmap/bgrabitmaptypes.pas(237,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(LongInt,LongInt):<record type>;
lazpaint/bgrabitmap/bgrafilters.pas(651,49) Error: Can't determine which overloaded function to call
lazpaint/bgrabitmap/bgrabitmaptypes.pas(238,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(Single,Single,TResampleFilter="0"):<record type>;
lazpaint/bgrabitmap/bgrabitmaptypes.pas(237,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(LongInt,LongInt):<record type>;
lazpaint/bgrabitmap/bgrafilters.pas(652,49) Error: Can't determine which overloaded function to call
lazpaint/bgrabitmap/bgrabitmaptypes.pas(238,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(Single,Single,TResampleFilter="0"):<record type>;
lazpaint/bgrabitmap/bgrabitmaptypes.pas(237,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(LongInt,LongInt):<record type>;
lazpaint/bgrabitmap/bgrafilters.pas(653,49) Error: Can't determine which overloaded function to call
lazpaint/bgrabitmap/bgrabitmaptypes.pas(238,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(Single,Single,TResampleFilter="0"):<record type>;
lazpaint/bgrabitmap/bgrabitmaptypes.pas(237,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(LongInt,LongInt):<record type>;
lazpaint/bgrabitmap/bgrafilters.pas(654,49) Error: Can't determine which overloaded function to call
lazpaint/bgrabitmap/bgrabitmaptypes.pas(238,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(Single,Single,TResampleFilter="0"):<record type>;
lazpaint/bgrabitmap/bgrabitmaptypes.pas(237,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(LongInt,LongInt):<record type>;
lazpaint/bgrabitmap/bgrafilters.pas(1399,56) Error: Can't determine which overloaded function to call
lazpaint/bgrabitmap/bgrabitmaptypes.pas(238,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(Single,Single,TResampleFilter="0"):<record type>;
lazpaint/bgrabitmap/bgrabitmaptypes.pas(237,15) Hint: Found declaration: TBGRACustomBitmap.GetPixel(LongInt,LongInt):<record type>;
lazpaint/bgrabitmap/bgrafilters.pas(1503) Fatal: There were 8 errors compiling module, stopping
i'm here ! ^^I'll do the french translation of update_checker.po
Done
No. It can be added in the View menu for example.
It this a problem of compatibility with the version of Lazarus ?
Ok, i've uploaded as lazpaint 4.3 source code.
I just notice that there is a bug with the clipboard. So maybe we should wait for version 4.4
Strange. Have you selected two different colors ?
Congratulations for the effort to develop such a great program. I think I'll start installing it on all my customers machines (I'm in system support business) to boost it's popularity ;)
Great work guys!!!No the text tool is included. You find it in the tools popup second line, then when creating a text, another toolbar is shown on the right of the main toolbar.
Some weeks ago I've installed 4.2 version and I couldn't find the text tool. Is it missing?
I 'm trying to run lazpaint and gives me an error message:
'\bgrabitmap\bgragradientscanner.pas(648,26) Error: Illegal qualifier
'
bgragradientscanner.pas(648,26) is the line with code:
alpha := FMaskScanNext.red;
What should I do to run it?
bgrabitmap4.7.2
@panoss: What happens if you replace bySorry, but the error message I mentioned, appeared in a windows xp machine in an internet cafe, and now I don't have access to it :-[.
alpha := FMaskScanNext().red
?
Ok so here is last version LazPaint4.5 as zip and exe for Windows :
https://sourceforge.net/projects/lazpaint/files/bin/
It uses last version of BGRABitmap (4.8)
I've asked Daniel for the Linux version.
Hmm, it seems I've hit a bug...
I've installed the 4.6 release on 32-bit XP, and the SaveAs doesn't seem to function properly:
- When I edit a JPEG file, it saves it again as JPEG, no matter what format I chose from the list
- When I create a new file, it saves it as PNG regardless of the format I chose; in this case the same goes if I use Save instead of SaveAs...
@CircularThat's a good idea.
You can add some 'TSpinEdit' in 'Color' floating window, to set RGB and Alpha from numbers?
Or a 'ColorDialog' with an Alpha 'TSpinEdit'.
Other thing I need about the selection tool, if can be faster using only a dotted line (like in the grid), because that's really slow when I zoom to x128. BTW if isn't faster a dotted line, is a good option to see the content I've selected.I don't understand. The zoom does not make it slower. It's only slow if you've got a big image.
I don't understand. The zoom does not make it slower. It's only slow if you've got a big image.
Maybe it is a bug of TSaveDialog on XP.
Coming soon : Mac version of LazPaint 4.7. 8-)
Well I'm not on facebook.
No problem. I would be grateful to you. :)
When you want I can add you as administrator. you just need a facebook account.Well I work for a secret service, so I must stay anonymous... :D
Wow, that looks good.QuoteWhen you want I can add you as administrator. you just need a facebook account.Well I work for a secret service, so I must stay anonymous... :D
Wow, that looks good.:oQuoteWhen you want I can add you as administrator. you just need a facebook account.Well I work for a secret service, so I must stay anonymous... :D
Can you give some help ?
http://en.wikipedia.org/wiki/OpenRaster (http://en.wikipedia.org/wiki/OpenRaster) ?
Well you can learn :)Can you give some help ?
as much as i want to help im not knowledgeable enough about graphics programming and im a noob in programming too cannot do OOP %)
Why not. I've already thought about it, I will look again if I find it satisfactory.http://en.wikipedia.org/wiki/OpenRaster (http://en.wikipedia.org/wiki/OpenRaster) ?
that looks good thanks for suggesting
- it must be compressed with zip format (so a zip compressor/decompressor is needed)It is part of standard FPC library.
- it uses PNG, which is not reliable on FreePascalThat's bad, but I think in that case fixing PNG support would be
Have you a way to solve this ?Post a bug report about PNG problems?
Or another format to propose ?There's GIMP's XCF, but AFAIK GIMP developers themselves
Where ? I only know about zstream, which allows to compress but not in the zip format.Quote- it must be compressed with zip format (so a zip compressor/decompressor is needed)It is part of standard FPC library.
Yes. Some people have already posted about errors.Quote- it uses PNG, which is not reliable on FreePascalThat's bad, but I think in that case fixing PNG support would be
a worthy goal on its own, wouldn't it?
There is also PSP and PSD formats.QuoteOr another format to propose ?There's GIMP's XCF, but AFAIK GIMP developers themselves
say that OpenRaster is preferable as an interchange format.
Can someone build the linux version ?Done for i386 with GTK2 and Qt interface. Update checker in separate archive.
And I need to practice facebook a little more. ;)
Yes, I know. I try to be careful with that.And I need to practice facebook a little more. ;)
You mean, give more info about you to the CIA? O:-)
pix := Colorcircle.bmpMaxlight.GetPixel(integer(x-ColorCircle.Bounds.Left),integer(y-ColorCircle.Bounds.top));
(adding integer because it cannot recognize which function to call)
Yes, I know. I try to be careful with that.And I need to practice facebook a little more. ;)
You mean, give more info about you to the CIA? O:-)
Thank you very much. I'm going to check your request on sourceforce.
Maybe the Ctrl key will be useful for you when editing icons (it snaps the pen to pixel grid).
I'm not sure what you mean by your project "based the current status".
Thank you for the info I'll try it later and see how it goes, although I think that a simple rectangular brush is missing,For that purpose, set brush size to 10 and use Ctrl key.
don't bother on my account, I'm just color editing for now.
I mean that the current status of lazpaint is enough for the needs of the project I have in mind and I don't know if any extra abilities will make it any easier or harder to use.Don't worry about that. I'm planning to keep LazPaint simplicity, even if I add new features. For layers, I'm planning to add just one little icon in the toolbar and one menu item in the View menu, and that when it's clicked the layer window appears. But if it's not clicked, everything should just work the same way.
I was also thinking about it, but I first want to add layers, and then I will need to have some time. Maybe when layers are added, some contributor will come up to help us with the web site. 8-)
If I remember well what FabienWang told me, it is possible to host a web site on sourceforge. But it is also possible to create a domain name for that. It's not expensive.
Have you tried latest svn version ? (basic layer support, no undo/redo)
Have you tried latest svn version ? (basic layer support, no undo/redo)
i only downloaded this version lazpaint4.8_win32.zip
is their a link to the version with layer support?
@circularYou may be interested by that vectorized font :
just a suggestion, can you add a text outline thickness setting? or if this is already available how can i do it
Just to tell you that I've done layer support, and now I'm doing undo/redo for layers.Great! Waiting for a release :D
Just to tell you that I've done layer support, and now I'm doing undo/redo for layers.
QuoteJust to tell you that I've done layer support, and now I'm doing undo/redo for layers.Great! Waiting for a release :D
Hehe, why not just compile it?I think for LazPaint I will use it as a daily software, which means it has to be stable ;)
D:\components\bgrabitmap\bgrabitmap\bgrablend.pas(387,17) Hint: Converting the operands to "Int64" before doing the multiply could prevent overflow errors.
D:\components\bgrabitmap\bgrabitmap\bgrablend.pas(414,17) Hint: Converting the operands to "Int64" before doing the multiply could prevent overflow errors.
D:\components\bgrabitmap\bgrabitmap\bgrablend.pas(448,17) Hint: Converting the operands to "Int64" before doing the multiply could prevent overflow errors.
D:\components\bgrabitmap\bgrabitmap\blendpixelinline.inc(532,38) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
D:\components\bgrabitmap\bgrabitmap\blendpixelinline.inc(564,16) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(10,28) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(10,29) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(24,42) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(24,54) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(37,30) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(37,31) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(10,28) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(10,29) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(24,42) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(24,54) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(37,30) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\lineartexscan2.inc(37,31) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,32) Error: Unknown identifier "TEXPOSBYZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,34) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,41) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,53) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,32) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,33) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(108,48) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(108,60) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,32) Error: Unknown identifier "TEXPOSBYZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,34) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,41) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,53) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,32) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,33) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(108,48) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(108,60) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,32) Error: Unknown identifier "TEXPOSBYZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,34) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,41) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,53) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,32) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,33) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(108,48) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(108,60) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,32) Error: Unknown identifier "TEXPOSBYZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,34) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,41) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,53) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,32) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,33) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(108,48) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(108,60) Error: Identifier not found "intTexPos"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,32) Error: Unknown identifier "TEXPOSBYZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(65,34) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,41) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(106,53) Error: Identifier not found "texPosByZ"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,32) Error: Unknown identifier "INTTEXPOS"
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,33) Error: Assembler syntax error
D:\components\bgrabitmap\bgrabitmap\perspectivescan2.inc(68,33) Fatal: There were 50 errors compiling module, stopping
The Layer Window is not visible by default because it is a bit complicated. I do not want to frighten users.
That's why I added a button in the tool bar to show the layer window. Do you suggest that it is not obvious enough?
Alright, let it be visible from the beggining.The Layer Window is not visible by default because it is a bit complicated. I do not want to frighten users.Paint.NET has layers defaulted to visible too so i think its safe for most people to see the layers window
maybe adding a tooltip with text that says "Layers Window" can make it more obviousOh, maybe the action list replaced it, ok that's fixed.
btw if you want more feature suggestion i can suggest having text outline thickness settingYes, it's on my todo list
and yes the text tool also has an error it says "Access Violation", im using Windows 7 Ultimate 64-bit i compiled LazPaint 5.0 with this lazarus-1.0.6-fpc-2.6.0-win32.exeEven with latest BGRABitmap?
the layers window is acting fine and nice that you added "Blending Modes" on it thats really cool :D:)
Quotemaybe adding a tooltip with text that says "Layers Window" can make it more obviousOh, maybe the action list replaced it, ok that's fixed.
Quotebtw if you want more feature suggestion i can suggest having text outline thickness settingYes, it's on my todo list
Quoteand yes the text tool also has an error it says "Access Violation", im using Windows 7 Ultimate 64-bit i compiled LazPaint 5.0 with this lazarus-1.0.6-fpc-2.6.0-win32.exeEven with latest BGRABitmap?
This version seems ok for me, so tell me if there is still some change to be applied before it is published as a binaryView->Layers:
good progressionThanks.
just a small suggestion , if you could make the layers movements just like photoshop , the background frame should be fixed (zoom in/out only) and the layers move over it .I don't understand
the layer blending mode could be just a drop listbox so you just select instead of popup another window.They are added to the combobox when they are selected in the popup window. My idea was that when you don't know what blending modes are, you can preview them. There are too much blending modes to put them automatically in the combobox to my opinion.
But that's the case.Seems not here (fresh svn) (err... I can't take a screenshot while the menu is shown)
switch to debug mode for LazPaint (this is in the top left toolbar when you open this project)
00683D22 8b36 mov (%esi),%esi
- Checked: layers invisible
- Unchecked: layers visible
@j0x:
well I can't do anything with that, there's no debug info here other than pure cpu state. here is what I was talking about :
to me its working fine it goes likeI'll look at the code I have. Btw, the source I have is of r505. Does it match with this 5.1 we're talking about?
Checked: layers visible
Unchecked: layers invisible
Thanks.@j0x:
well I can't do anything with that, there's no debug info here other than pure cpu state. here is what I was talking about :
i think i got it this time here it is screenshots below and the compiled version you given me via PM still having the error of Access Violation when i use the Text tool
http://i.imgur.com/LoDcZUx.png
http://i.imgur.com/2gImE3s.png
if fx.TextMask = nil then
begin
fx.Free;
FxFont.Free;
exit;
end;
(before alphaMax := 0 in BGRATextFX)are you going to do some optimization ? . because its terribly slow compared with other painting softwareI would like to do some optimizations later, but first I would like to make it work.
i think its because of the compiler !!! . just thought
Try adding at line 235 those lines :Code: [Select]if fx.TextMask = nil then
(before alphaMax := 0 in BGRATextFX)
begin
fx.Free;
FxFont.Free;
exit;
end;
EDIT: What is the call stack when this bug happens ? (View > Debug Window > Call Stack, CTRL-ALT-S)
I'll look at the code I have. Btw, the source I have is of r505. Does it match with this 5.1 we're talking about?Seems like Qt specific issue (recompile with GTK2 and everything works as expected), though I have no idea which code causes the bug in my case.
Here is a video tutorial on how to use layers to extract an object from an image and put it multiple times :
http://www.youtube.com/watch?v=Hxinfs6ziFc
But more important, you don't need to include the update_checker. It is not used anymore, because it is included.Oh, alright, I'll reupload with update_checker removed. Where's the update functionality then? Is it automatically checked on start?
BGRATutorial3D when I click 'ex4' there is a 'run error(3)' 'Invalid FileName'.Ok that's always the same error with the obj directory. I added a workaround on subversion and a more understandable error message.
TestCanvas2D when I change to '2' there is a 'run error(201)' 'Range check error'.; '4', '10', '17' and '19' the same.Thanks, yes, this should not be triggered. I've added "and $ffff" on subversion.
Seems a good idea however well the thing is that the development is stopped for now.
...
- printer, scanner ;)
SYSTEM_MOVE$formal$formal$INT64
0000000000403500 4c89c0 mov %r8,%rax
0000000000403503 4829d1 sub %rdx,%rcx
0000000000403506 0f8491000000 je 0x40359d <SYSTEM_MOVE$formal$formal$INT64+157>
000000000040350C 7309 jae 0x403517 <SYSTEM_MOVE$formal$formal$INT64+23>
000000000040350E 4801c8 add %rcx,%rax
0000000000403511 0f826d010000 jb 0x403684 <SYSTEM_MOVE$formal$formal$INT64+388>
0000000000403517 4983f808 cmp $0x8,%r8
000000000040351B 0f8c63000000 jl 0x403584 <SYSTEM_MOVE$formal$formal$INT64+132>
0000000000403521 f6c207 test $0x7,%dl
0000000000403524 7437 je 0x40355d <SYSTEM_MOVE$formal$formal$INT64+93>
0000000000403526 f6c201 test $0x1,%dl
0000000000403529 740c je 0x403537 <SYSTEM_MOVE$formal$formal$INT64+55>
000000000040352B 8a0411 mov (%rcx,%rdx,1),%al
000000000040352E 49ffc8 dec %r8
0000000000403531 8802 mov %al,(%rdx)
0000000000403533 4883c201 add $0x1,%rdx
0000000000403537 f6c202 test $0x2,%dl
000000000040353A 740f je 0x40354b <SYSTEM_MOVE$formal$formal$INT64+75>
000000000040353C 668b0411 mov (%rcx,%rdx,1),%ax
0000000000403540 4983e802 sub $0x2,%r8
0000000000403544 668902 mov %ax,(%rdx)
0000000000403547 4883c202 add $0x2,%rdx
000000000040354B f6c204 test $0x4,%dl
000000000040354E 740d je 0x40355d <SYSTEM_MOVE$formal$formal$INT64+93>
0000000000403550 8b0411 mov (%rcx,%rdx,1),%eax
0000000000403553 4983e804 sub $0x4,%r8
0000000000403557 8902 mov %eax,(%rdx)
0000000000403559 4883c204 add $0x4,%rdx
000000000040355D 4d89c1 mov %r8,%r9
0000000000403560 49c1e905 shr $0x5,%r9
0000000000403564 7538 jne 0x40359e <SYSTEM_MOVE$formal$formal$INT64+158>
0000000000403566 4d89c1 mov %r8,%r9
0000000000403569 49c1e903 shr $0x3,%r9
000000000040356D 7415 je 0x403584 <SYSTEM_MOVE$formal$formal$INT64+132>
000000000040356F 90 nop
0000000000403570 488b0411 mov (%rcx,%rdx,1),%rax
0000000000403574 488902 mov %rax,(%rdx)
0000000000403577 4883c208 add $0x8,%rdx
000000000040357B 49ffc9 dec %r9
000000000040357E 75f0 jne 0x403570 <SYSTEM_MOVE$formal$formal$INT64+112>
0000000000403580 4983e007 and $0x7,%r8
0000000000403584 4d85c0 test %r8,%r8
0000000000403587 7e14 jle 0x40359d <SYSTEM_MOVE$formal$formal$INT64+157>
0000000000403589 66666690 data32 data32 xchg %ax,%ax
000000000040358D 666690 data32 xchg %ax,%ax
0000000000403590 8a0411 mov (%rcx,%rdx,1),%al
0000000000403593 8802 mov %al,(%rdx)
0000000000403595 48ffc2 inc %rdx
0000000000403598 49ffc8 dec %r8
000000000040359B 75f3 jne 0x403590 <SYSTEM_MOVE$formal$formal$INT64+144>
000000000040359D c3 retq
000000000040359E 4981f900200000 cmp $0x2000,%r9
00000000004035A5 7209 jb 0x4035b0 <SYSTEM_MOVE$formal$formal$INT64+176>
00000000004035A7 4881f900100000 cmp $0x1000,%rcx
00000000004035AE 7333 jae 0x4035e3 <SYSTEM_MOVE$formal$formal$INT64+227>
00000000004035B0 4883c220 add $0x20,%rdx
00000000004035B4 488b4411e0 mov -0x20(%rcx,%rdx,1),%rax
<<< the last lineprocedure StretchPutImage(bmp: TBGRACustomBitmap; NewWidth, NewHeight: integer;
dest: TBGRACustomBitmap; OffsetX, OffsetY: Integer; ADrawMode: TDrawMode; AOpacity: byte);
for y_dest := targetRect.Top to targetRect.Bottom - 1 do
begin
begin
if tempData = nil then
move((dest.ScanLine[y_dest-1+OffsetY]+OffsetX+targetRect.Left)^,(dest.ScanLine[y_dest+OffsetY]+OffsetX+targetRect.Left)^,(targetRect.Right-targetRect.Left)*sizeof(TBGRAPenStyle))
else
PutPixels(dest.ScanLine[y_dest+OffsetY]+OffsetX+targetRect.Left,tempData,targetRect.right-targetRect.left,ADrawMode,AOpacity);
end
move((dest.ScanLine[y_dest-1+OffsetY]+OffsetX+targetRect.Left)^,(dest.ScanLine[y_dest+OffsetY]+OffsetX+targetRect.Left)^,(targetRect.Right-targetRect.Left)*sizeof(TBGRAPenStyle))
procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];assembler;nostackframe;
{ Linux: rdi source, rsi dest, rdx count
win64: rcx source, rdx dest, r8 count }
asm
{$ifndef win64}
mov %rdx, %r8
mov %rsi, %rdx
mov %rdi, %rcx
{$endif win64}
...
This is needed, in order to interact with several image in the same time.
if i can suggest you for the next steps:
+ multiple images open in tabs?
About having a panel for image processing, that is a good idea. It would be a light alternative to the tabs and multiple images opened at the same time.
I will check changes when I update the SVN. Percentage is needed in the Canvas resize dialogue, too, I will check what I can do.
I applied your patch. I modified a bit so that the ratio is also kept with percentages. I also added code to prevent de size from being zero (1% of 20 is zero for example).
I suppose I won't be able to start before say 10 of June.
I can take care of the layout if you like, so that you can focus on the panel you would like to add.
However if you would like to do that layout too, tell me.
1. Selected areas, layers, drawing (with pen, etc) etc. shall be draggable with the arrow keys, too, not only with the mouse. Maybe it will be better if some hot keys are enabled, for example:Good idea.
Left arrow- drag 1 pixel left
Left arrow+ Ctrl- drag 10 pixel left.
Left arrow + Alt- drag 5% of the image size left (sometimes 10 pixel are nothing, sometimes they are too much, depending on the size of the image).
2. I am used to using GIMP, though I do not like latest versions. That is why I was searching for the "Open as new layer" in the file menu. Finally I found it in the layers panel, but I still think it should be available in the File menu.This is an easy one. I have done it.
Well the thing is that tabs is out of the scope of version 6.0, as I would like to publish it soon, lets say in June or July.
About having a panel for image processing, that is a good idea. It would be a light alternative to the tabs and multiple images opened at the same time.
That is not an absolute alternative, since if I need to copy from one image into another, I need both images open, but for other purposes it is better.
I will check changes when I update the SVN. Percentage is needed in the Canvas resize dialogue, too, I will check what I can do.Ok.
Ok. I may have done it in the meatime.I suppose I won't be able to start before say 10 of June.
I can take care of the layout if you like, so that you can focus on the panel you would like to add.
However if you would like to do that layout too, tell me.
There is also a problem, that LazPaint does not show the default extension when saving images, I would take care for that, too.Ok.
Ok. I may have done it in the meatime.I suppose I won't be able to start before say 10 of June.
I can take care of the layout if you like, so that you can focus on the panel you would like to add.
However if you would like to do that layout too, tell me.
There is a boring issue- when I close the SVN version of LazPaint it shows some (probably debug) mesages. How am I to disable them?It shows me plenty of messages, so I have to kill application upon exit :-\
What happens if you start with a fresh directory, do you get the same error?I copied the exe in the Programs Files folder (where normal version was installed) and I got a single message display.
a useful feature will be a panel with images for processing, or in details:A patch with this functionality is attached.
Several files are added to the panel (with a file open menu or drag and drop). In the panel there shall be Prev and Next button. When the Next button is pressed current image closes and the next one is open. No memory will be wasted for opening multiple images at the same time, and there will be no effort for opening each file separately.
Please improve this, this is really useful feature.Would be nice if you could submit a patch or code with performance improvements ;)
Would be nice if you could submit a patch or code with performance improvements ;)I'm just a noob here. :)
Thanks I will have a look at it.If you have not started doing something on the patch, please let me know, I will upload a complete patch, including the fixed bug (asking to save changed documents).
It is useful if you want to go through a list of picture to modify them or display them.
I am not sure about the check thing. Would seem more natural to me that checked lines are lines that are already done.
It is a bit confusing that the icon to minimize the window is similar to the mirror effect.
I see now. I see place for a shortcut editor. ;D
About the duplicated shortcuts, it is normal. You need to press twice the shortcut key in order to get the second item that has the shortcut.
It might be used for batch processing, if implemented, one day.Yes with the scripting feature. Basic working of scripting is 80% done I would say.
I uploaded the exe, considering that there might be some user user feedback. Maybe I can add a pop-up menu, to select uncheck mode, or replace it with a combobox. The checkmark button does not look good, anyway.Finding the right interface look is not easy sometimes. I understand however the idea that if it is to be processed then you would check it for that.
I have attached two icons. Maybe roll_up.png should make window smaller, and roll_down.png-bigger (there are some similar behaviour in some *nix desktop environments). Would you change them, or I'd better submit a new patch?I think these icons are a bit too os-specific. What about those ones? Yes I may change one or more icon however of course suggestions are welcome.
About icons, visual appearance, etc, I suppose it is you who has to have the final decision, in order to prevent inconsistency.
When you update repository, I will add some extra functionality.Done. Now you can. :)
I see now. I see place for a shortcut editor. ;DWell, why not.
I think these icons are a bit too os-specific. What about those ones?Perfect :D
There is a problem- when the window is closed with a click on the + button, it needs to be enabled twice in order to be shown again.
I hope circular won't have troubles fixing it.
...I have optimised the rotate layer function. While rotating, box filter is used (integer coordinates).I see no box anywhere. I expected rotation to be done differently. IMHO, there should be a dialog box, allowing to enter exact rotation value and offset (example from Gimp is attached) . Now I simply cannot adjust the angle even close to what I need, I wonder how other people can.
This bug still stays:Ah ok. Fixed.
There is a problem- when the window is closed with a click on the + button, it needs to be enabled twice in order to be shown again.
I hope circular won't have troubles fixing it.QuoteNo no, box filter is not about showing a box, but about how intermediate pixels are determined. Basically a box filter does not involve mixing pixels colors, so it is less beautiful. Gimp preview for rotation for example is rather ugly....I have optimised the rotate layer function. While rotating, box filter is used (integer coordinates).I see no box anywhere. I expected rotation to be done differently. IMHO, there should be a dialog box, allowing to enter exact rotation value and offset (example from Gimp is attached) . Now I simply cannot adjust the angle even close to what I need, I wonder how other people can.
I could check if I can do something about that, after I am done with the image list and resizing percentage of the layers, if no one does not take care for that in shorter time?
I don't how other people can or if they can do what you want. You need is to have a precise angle if I understand. This could be added in the toolbar. However, remember this version is to be published, so let's not get into too much complicated things. We can add many things in a future version.
Gimp preview for rotation for example is rather ugly.Gimp itself is ugly.
I don't how other people can or if they can do what you want. You need is to have a precise angle if I understand. This could be added in the toolbar.
Well, I do not mean now ;D
However, remember this version is to be published, so let's not get into too much complicated things. We can add many things in a future version.
Ok. However I am talking about the rendering of the pixels. They seem to be scrambled.Gimp preview for rotation for example is rather ugly.Gimp itself is ugly.
I would rather disagree with adding this functuality in the toolbar. I quite often scan documents and sometime I need to rotate 1 or 2 degrees, sometimes even 1,3 degrees, for example. The benefit of the resizable window is that I can enlarge it and put it under a line or a column, to make sure it is at the correct angle (see attached sample- I am verifying with the top and right rim of the form). Maybe a semi- transparent window will be better.I don't quite understand, tell me if I did not get what you mean. In the toolbar, we can add a TextBox where the user can enter an angle in degrees as a floating point value, or a NumericUpDown with 2 decimal places. About the rim, are you talking about the fact that the image is drawn outside of the bounds so that you can see how much of the image will be clipped?
Alright.Well, I do not mean now ;D
However, remember this version is to be published, so let's not get into too much complicated things. We can add many things in a future version.
So, I think I have done all functionality of the image list I have thought of. Before submitting the patch, I have to mention that I found a bug in the ImageList implementation, which occurred to be related on a bug in the Layers Window- and exactly: Layers Window width and height are not retrieved from the .cfg file upon restart of the app (they are stored, anyway). Would you like to fix the Layers Window, so I could fix image list with the same code, or it shall be left for a later stage?Ok, fixed.
Thanks.Thank you so much circular, layer rotation is really faster now. :)
Fahmy Rofiq is going to be happy, I have optimised the rotate layer function. While rotating, box filter is used (integer coordinates). And affine transformation using box filter is now very optimised.
This is on SVN (LazPaint and BGRABitmap). It requires last update of BGRABitmap.
:)
Gimp itself is ugly.Ok. However I am talking about the rendering of the pixels. They seem to be scrambled.
I don't quite understand, tell me if I did not get what you mean. In the toolbar, we can add a TextBox where the user can enter an angle in degrees as a floating point value, or a NumericUpDown with 2 decimal places. About the rim, are you talking about the fact that the image is drawn outside of the bounds so that you can see how much of the image will be clipped?No, I mean something else. I will add screenshots for a better explnanation later... when I happen to have time.
7. What about leaving the imagelist.pas under LGPL3 licence? I think there is no problem if separtae components have separate licensing?
It's a general practice, that all PAS files have a copyright notice in their headers, something like this:That's a license statement + a copyright notice ;) But yes, it can help if you are dealing with various licenses in one project...
Edit... I just read some more about LGPL. It seems more restrictive than GPL, I have no idea why I've got the opposite impression.No idea where you read that. You're not allowed to link GPL units into (basically) non-GPL licensed programs, but you are allowed to do that with LGPL. As taazz indicated, GPL is not enough for libraries for many people (me included) for that reason.
Eeer, any idea what license should be used for "do what you want with the code, just mention the source in the about info, so other people can find and use it easily?"depends on what kind of "do what you want with the code" you are after. For example the mpl requires that any enhancements on the library it self is suppose to be made public as well anything else can be under any license as long as the source is mentioned on the about box. if you want to allow a more "free" usage eg even enhancements can be on any license then a derivative of BSD should do the job. Personally for components and libraries I prefer the MPL, although the ip stack that every modern system has build in began its life on BSD license.
I got the impression, that *taaz is not talking about uimagelist.pas, but generally, do I understand things right?Yes I guess tazz is talking about imagelist component of Lazarus.
Since uimagelist.pas (with some changes) can be used for similar purposes in other apps, I would prefer it to be released under LGPL. Because LGPL is less restrictive than GPL, I think there is no problem for a GPL app tu use LGPL components?I understand, however it is too dependent here to be separate component. In order to make it a component, I guess the simplest thing would be to do a package (we can put it on LazPaint repository or another one). Then you'll see when compiling it if it is independent. You will need to add some way to define the labels instead of using the constants from uresourcestring.pas and to set the list of file types.
Edit... I just read some more about LGPL. It seems more restrictive than GPL, I have no idea why I've got the opposite impression.It is less restrictive for me, because it allows to be embedded into another program with another license.
Eeer, any idea what license should be used for "do what you want with the code, just mention the source in the about info, so other people can find and use it easily?"depends on what kind of "do what you want with the code" you are after. For example the mpl requires that any enhancements on the library it self is suppose to be made public as well anything else can be under any license as long as the source is mentioned on the about box. if you want to allow a more "free" usage eg even enhancements can be on any license then a derivative of BSD should do the job. Personally for components and libraries I prefer the MPL, although the ip stack that every modern system has build in began its life on BSD license.
There is a point in that.QuoteSince uimagelist.pas (with some changes) can be used for similar purposes in other apps, I would prefer it to be released under LGPL. Because LGPL is less restrictive than GPL, I think there is no problem for a GPL app tu use LGPL components?I understand, however it is too dependent here to be separate component. In order to make it a component, I guess the simplest thing would be to do a package (we can put it on LazPaint repository or another one). Then you'll see when compiling it if it is independent. You will need to add some way to define the labels instead of using the constants from uresourcestring.pas and to set the list of file types.
And with the fixes came some bugs : :-XThe reason is that if there are 50 files that cannot be opened, this will show 50 message boxes. Otherwise we can agglomerate error messages for the different files and display them in one single message box, and load the image with the files that could be read.
1. If some of the files added to the main window of LazPaing by drag and drop is not supported an error message is shown that the file is not supported and no files are added. AFAIR I have tested this before sending the patch- an error message used to be shown, but all other files were added.
I see no reason why this message should be shown in this particular situation, I just kept your previous behaviour.
In uimagelist.pas there is a function IsExtensionValid. You might consider to move it to a PAS file with global functions and use it in the main form, too.Yes, in any case, it would be a good thing to put this in a separate unit as simple procedures/functions. Then, this unit could be moved to any package.
2. You have changed shortcuts for Next and Previous image from the image list to Alt+Left and Alt+Right.That is a way to solve it. That said, Key variable should be set to zero to say it has been processed. This could solve the problem too.
2.1. Now when I press one of the shortcuts an image is skipped, i.e. if file 3 is open, the next open file is 5, instead of 4.
I think the reason is that pressing the arrow key moves the selected row a line up/down, and after that the procedure is called and the line is moved once again.
The problems is that I cannot disable keyboard navigation (auto advance:=false does not help).
One possible solution is to store the current row and increment it upon alt-Left/right.
Could there be another way out?
Edit: I fixed it by disabling stringgrid on Alt, and reenabling it on KeyUp. I will submit a patch, unless you prefer another solution.
2.2. I have assigned Space and BackSpace because they are active only when the imagelist is active. Maybe with Alt+Left and Alt+Right these shortcuts should become global?That is why I changed the shortcuts, to make them global shortcuts. Space and Backspace obviously interferes with tools input.
3. When files are added to the image list the first one is opened automatically. I am not sure that this is a good idea, maybe some settings checkbox should be used? I would ask other users (if any) opinions.Yeah I don't know. I thought that it would be quicker. Also the problem is that when we click the Next arrow, it opens the second file when in my opinion if the first one has not been opened, it should be opened at this moment.
4. I wonder- maybe the imagelist shall show automatically, after files are dragged and dropped in the image list? What do you think?I suppose you mean when files are dropped in LazPaint, and that we choose to open in image list? Yes that is a good idea.
5. On Line 307 WidthMinimal:=300 shall become WidthMinimal:=340, because of the increased number of buttons.Ok.
6. I saw some Paskal added in the About info. If you insist that my name should be added there, I'd rather prefer to be quoted under Contributors, or if that is not okay- as СМ630.So to add a line under Author? If you like, yes.
8. Just a reminder to myself, so I don;'t forget for thenext release of LazPaint- to add files to the image list trough commande line...if it makes sense.That can prove useful if you call LazPaint from a batch file or a third party program.
someone posts a function, for example in this forum. Then I use it in my source. If I publish my source (for example) under GPL, it will contain functions, which I do not own and therefore I cannot apply restrictions on them. So what to to then? Shall these functions have standalone licensing, or shall they be put in a separate unit, with separate licensing?If someone posts a function, I suppose he/she does not mind it being GPL/LGPL/MPL/BSD. If you want to be clear in your code, you can write before the function something like "This function comes from a public forum and can be reused without any restriction".
Maybe that shall be discussed in another thread in another section of the forum?
But I there is an issue: someone posts a function, for example in this forum. Then I use it in my source. If I publish my source (for example) under GPL, it will contain functions, which I do not own and therefore I cannot apply restrictions on them. So what to to then? Shall these functions have standalone licensing, or shall they be put in a separate unit, with separate licensing?I think it is a very good idea to split off that discussion to a new discussion thread in an a more relevant section. I'm sure though that you'll get very many responses...
Maybe that shall be discussed in another thread in another section of the forum?
Here are my answers, Paskal. Please tell me if you intend to take care of one of those so that we do not do it twice.And with the fixes came some bugs : :-XThe reason is that if there are 50 files that cannot be opened, this will show 50 message boxes. Otherwise we can agglomerate error messages for the different files and display them in one single message box, and load the image with the files that could be read.
1. If some of the files added to the main window of LazPaing by drag and drop is not supported an error message is shown that the file is not supported and no files are added. AFAIR I have tested this before sending the patch- an error message used to be shown, but all other files were added.
...
In uimagelist.pas there is a function IsExtensionValid. You might consider to move it to a PAS file with global functions and use it in the main form, too.
2. You have changed shortcuts for Next and Previous image from the image list to Alt+Left and Alt+Right.That is a way to solve it. That said, Key variable should be set to zero to say it has been processed. This could solve the problem too.
2.1. Now when I press one of the shortcuts an image is skipped, i.e. if file 3 is open, the next open file is 5, instead of 4.
I think the reason is that pressing the arrow key moves the selected row a line up/down, and after that the procedure is called and the line is moved once again.
The problems is that I cannot disable keyboard navigation (auto advance:=false does not help).
One possible solution is to store the current row and increment it upon alt-Left/right.
Could there be another way out?
Edit: I fixed it by disabling stringgrid on Alt, and reenabling it on KeyUp. I will submit a patch, unless you prefer another solution.
2.2. I have assigned Space and BackSpace because they are active only when the imagelist is active. Maybe with Alt+Left and Alt+Right these shortcuts should become global?That is why I changed the shortcuts, to make them global shortcuts. Space and Backspace obviously interferes with tools input.
3. When files are added to the image list the first one is opened automatically. I am not sure that this is a good idea, maybe some settings checkbox should be used? I would ask other users (if any) opinions.Yeah I don't know. I thought that it would be quicker. Also the problem is that when we click the Next arrow, it opens the second file when in my opinion if the first one has not been opened, it should be opened at this moment.
4. I wonder- maybe the imagelist shall show automatically, after files are dragged and dropped in the image list? What do you think?I suppose you mean when files are dropped in LazPaint, and that we choose to open in image list? Yes that is a good idea.
5. On Line 307 WidthMinimal:=300 shall become WidthMinimal:=340, because of the increased number of buttons.Ok.
6. I saw some Paskal added in the About info. If you insist that my name should be added there, I'd rather prefer to be quoted under Contributors, or if that is not okay- as СМ630.So to add a line under Author? If you like, yes.
If someone posts a function, I suppose he/she does not mind it being GPL/LGPL/MPL/BSD. If you want to be clear in your code, you can write before the function something like "This function comes from a public forum and can be reused without any restriction".When I post my code I would not like someone to take rights over it and to prevent others, including myself to use it. I had a project in Berlios, I think it is in SF now, and I do include information for subs, which are not made by myself.
When I post my code I would not like someone to take rights over it and to prevent others, including myself to use it.
When I post my code I would not like someone to take rights over it and to prevent others, including myself to use it.I agree with that. Yes well let's continue on another thread because we are getting into misunderstandings and this might take a lot of pages. My point of view basically is that LGPL code can move freely between LGPL projects, however I reckon not everybody would agree with that. I would have a problem however with code moving from LPGL to commercial.
I had a project in Berlios, I think it is in SF now, and I do include information for subs, which are not made by myself.Yes it avoids any ambiguity.
I like the idea of agglomerating error messages. What about a for with a Memo inside and an Okay button? Next week I will check if I can talk with the file opening function.Ok.
Okay, please tell a name for the unit.ufileext.pas?
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.
The last one is a point, indeed. So I will leave autoopening, only if there are no other files in the filelist. If there are files, already, a new file will not be open. Does it sound okay?Yes, well I think that it does already.
Ok.QuoteI suppose you mean when files are dropped in LazPaint, and that we choose to open in image list? Yes that is a good idea.I will do it.
I mean that I do not like the idea to be listed as "Paskal". I am okay being named as Contributors ;D .I get it. Maybe something like "Circular helped by Lainz, FabienWang and others"?
The downloaded languages cannot be in the application folder in new version of Windows and on MacOS. It cannot be stored either in a temporary folder, because then it would be deleted without notice. So it is appropriate to store it in a configuration folder.I am not sure what you mean by The downloaded languages cannot be in the application folder in new version of Windows. Do you mean that due to some user restrictions if they are downloaded later thay cannot be installed in the same folder?
So, it occurs that these keys work, if the image list panel or the main form is active.QuoteStill 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.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.
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.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.
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 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:QuoteAlso, 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.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.
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 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.
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?Personally I think it is a good thing that the non selected area is deleted in this case.
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 (*.*).Nope it is PNG.
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?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.
I can take care for that issue.
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.
Quote1. 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?Personally I think it is a good thing that the non selected area is deleted in this case.
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?
So how are users supposed to know that default extension is PNG? There is an option to use filtering like PNG|*.*|JPG|*.*...Quote2. When Save As is selected from the menu, the default filter shown is All file types (*.*).Nope it is PNG.
Actually if no extension is written, the file is save as BMP.QuoteIMHO, 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?Currently the default extension is PNG. In the dialog box, I think it is ok that the format is not defined.
I can take care for that issue.
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".
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?Quote3. 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:
...
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.
So how are users supposed to know that default extension is PNG? There is an option to use filtering like PNG|*.*|JPG|*.*...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.
This way all files shall be seen, but users would know what extension is supposed to be added.
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.
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.
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.
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 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).
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?QuoteI 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.
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 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).
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.
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?
2. Save as dialog extension handling improvents. Commented until Settings windows is implemented.
I have applied the changes, except for:Quote2. Save as dialog extension handling improvents. Commented until Settings windows is implemented.
We need to do the following:
- check the extension index from the filter defined for the dialog
Well, I have already written this fuction in the imagelist form, it just needs to be moved to a more global unit. It has a shortcomming, that it does not ignore noncaseble chars (numbers, punctations, etc) which I will fix one day but that is not a bug indeed.
- creating the strings for the opendialogs using the functions that provide different cases for the extensions (however I am not sure anyway that we need to provide really all cases, as basically only the following are encountered "BMP, Bmp and bmp", an extension like "bMp" or "bMP" could safely be ignored)
an extension like "bMp" or "bMP" could safely be ignored)
You mean that if the extension is written manually the app should know to use that extension?No, I am talking about computing the index of the extensions by going through the filter string (the Filter property of the TOpenDialog/TSaveDialog). This way we can be sure that the index correspond to the extension. The Filter property need to contain the extension and moreover, the list may be different depending on the dialog box.
So if the user types image.png, the file will be automatically saved as PNG? Or you mean sth. else?
Well, I have already written this fuction in the imagelist form, it just needs to be moved to a more global unit. It has a shortcomming, that it does not ignore noncaseble chars (numbers, punctations, etc) which I will fix one day but that is not a bug indeed.Yes.
Yeah, I don't know if there could be a slow down let's say if we have a directory of thousands of files and each extension having 16 masks (*.abc; *.Abc, etc.). I reckon the beauty of generating all possible cases, but I am not sure it is reasonable. I propose you to go on with the code you wrote, and test it on Linux. I can test it on Puppy Linux and on Linux Mint. For Windows, this is better not to do it because it is not case sensitive. We can do that with a {$IFNDEF WINDOWS}
an extension like "bMp" or "bMP" could safely be ignored)
I seen no benefit from ignoring them.
No, I am talking about computing the index of the extensions by going through the filter string (the Filter property of the TOpenDialog/TSaveDialog). This way we can be sure that the index correspond to the extension. The Filter property need to contain the extension and moreover, the list may be different depending on the dialog box.
Well, I have already written this fuction in the imagelist form, it just needs to be moved to a more global unit. It has a shortcomming, that it does not ignore noncaseble chars (numbers, punctations, etc) which I will fix one day but that is not a bug indeed.Yes.
Yeah, I don't know if there could be a slow down let's say if we have a directory of thousands of files and each extension having 16 masks (*.abc; *.Abc, etc.). I reckon the beauty of generating all possible cases, but I am not sure it is reasonable. I propose you to go on with the code you wrote, and test it on Linux. I can test it on Puppy Linux and on Linux Mint. For Windows, this is better not to do it because it is not case sensitive. We can do that with a {$IFNDEF WINDOWS}
an extension like "bMp" or "bMP" could safely be ignored)
I seen no benefit from ignoring them.
I found out is a huge problem in LazPaint. When an indexed image is open (let's say 1bpp, or strictly black and white it is automatically converted to RGB). And after saving it takes significantly more disk space.I understand. We can update the writers to reduce the number of colors in the output file. I can take care of that. What format in particular did you use as an input?
If LazPaint cannot work in other mode than RGB, I suppose that a warning message should be shown, when a non RGB image is open.
I will test in on XUBUNTU. Indeed, it should better be skipped in Windows. Actually I was wondering if handling non-caseble extensions would require less or more resources. So you'd better wait until I add this fucntionality before starting tests. Maybe we could ask other people to test in the Linux section. It's a general issue.I did not think of that mounting of EXT on Windows. Yes if Windows can take it, it would be better to keep it on this platform too.
EDIT: Actually it is the file system that is case sensitive, not the OS. A FAT32 system mounted on should be case insensitive, which is quite common (USB devices, etc). Respectively an EXT2 FS, mounted on Windows will be case sensitive, which is quite a rare cse, IMHO, so indeed disabling AllExtension on Windows won't cause many problems. Anyway, it's worth testing. If no significant delay occurs, it could stay.
The best solution would be to act according the FAT, but AFAIK a standard dialog won't do that so the world will have to do without it ;)Oh ok, well, that may be a bit complicated. :D
...If LazPaint cannot work in other mode than RGB, I suppose that a warning message should be shown, when a non RGB image is open.I understand. We can update the writers to reduce the number of colors in the output file.
I can take care of that. What format in particular did you use as an input?
... Respectively an EXT2 FS, mounted on Windows will be case sensitive, which is quite a rare cse, IMHO, so indeed disabling AllExtension on Windows won't cause many problems. Anyway, it's worth testing. If no significant delay occurs, it could stay.I did not think of that mounting of EXT on Windows. Yes if Windows can take it, it would be better to keep it on this platform too.
The best solution would be to act according the FAT, but AFAIK a standard dialog won't do that so the world will have to do without it ;)Oh ok, well, that may be a bit complicated. :D
I thinks it's not that simple. For example, if you open a file with a custom palette of let's say 20 colours, and you open it in RGB mode, care should be taken that only the available indexed colours should be used. Maybe some restricted colour palettes could be used as a beginning.I understand. It is a bit out of the scope of LazPaint.
I opened some PNGs. I think JPG does not support indexed colours.Probably PNG is not automatically used with indexed mode.
I thinks it's not that simple. For example, if you open a file with a custom palette of let's say 20 colours, and you open it in RGB mode, care should be taken that only the available indexed colours should be used. Maybe some restricted colour palettes could be used as a beginning.I understand. It is a bit out of the scope of LazPaint.
...uses ... LazUTF8...
//All case extension subs
//TODO: Extensions containing non-caseable chars will be duplicated
function GetBit(Value: QWord; Index: Byte): Boolean;
begin
Result := ((Value shr Index) and 1) = 1;
end;
{en Converts aChar to uppercase if aUcase= true. No conversion is done if aUcase= false}
function UCase(aChar: string; aUcase: Boolean): string;
begin
if aUCase then Result:=UTF8UpperCase(aChar) else Result:=aChar;
end;
{en Checks if a character is caseble}
function IsCaseble(aStr: string): Boolean;
begin
Result:=not (UTF8LowerCase(aStr)=UTF8UpperCase(aStr));
end;
{en: Generates all possible upper and lowercase combinations of a string.
if HandleNonCaseble= true care is taken not to duplicate strings with no-caseble characters.}
function AllCases (aStr: string; Delimiter: String=';'; Prefix: string=''; Suffix: String=''; HandleNonCaseble: Boolean= True):string;
var
FWord,FChar:integer;
LCString: string;
Len: integer;
Count: integer;
LCArray: array of String;
CExt:string='';
Cased: Boolean;
CChar: String;
begin
Result := '';
Len:= Length(aStr);
LCString:=Utf8Copy(UTF8LowerCase(aStr),Length(Prefix)+1, Len-Length(Suffix)-Length(Prefix));
Len:=Length(LCString);
Count:=(1 shl len) - 1;
SetLength(LCArray,Len);
for FWord:=0 to Len -1 do
LCArray[FWord]:=Utf8Copy (LCString,FWord+1,1);
if HandleNonCaseble then
begin
for FWord:=0 to Count do
begin
CExt:='';
Cased:=True;
for FChar:=0 to Len-1 do
begin
CChar:=LCArray[FChar];
if IsCaseble(CChar)
then CExt:=CExt+ UCase (CChar,GetBit(FWord,FChar))
else if not GetBit(FWord,FChar)
then CExt:=CExt+ UCase (CChar,GetBit(FWord,FChar))
else
begin
CExt:=''; Cased:= False; Break; end;
end; //for FChar
if Cased then
begin
Result:= Result+ Prefix+ CExt + Suffix + Delimiter;
end; //if
end; //for FWord
end //if HandleNonCaseble
else
for FWord:=0 to Count do
begin
Result:=Result + Prefix;
for FChar:=0 to Len-1 do
begin
Result:=Result+ UCase (LCArray[FChar],GetBit(FWord,FChar));
end;
Result:=Result + Suffix + Delimiter;
end;
Result:= LeftStr(Result, Length(Result)-1); //Remove last Delimiter;
end;
function ExtensionAllCase (AllExtensions: String; HandleNonCaseble: Boolean= True): String;
var
ExtList: TStringList;
i: integer;
begin
Result := '';
ExtList:= TStringList.Create;
ExtList.Delimiter:=';';
ExtList.DelimitedText:=AllExtensions;
for i:=0 to ExtList.Count -1 do
Result:= Result + AllCases(ExtList[i],';','*.','',HandleNonCaseble);
ExtList.Free;
end;
//end All case extension subs
Actually maybe there is a way of reaching some decent result- when indexed colour is used (black and white, grayscale, custom palette), instead of the current colour selection palette a custom one shall be made.It is not so simple because the colors are merged with antialiasing and all. So it is not only about selecting the color in the palette.
line 360: FData[j].modification := FileDateToDateTime(age);
Thanks 007, it's fixed.
For the rain, I will add a more complete dialog box to do this effect.
There's another bug in other file open dialog of 'Image List'.What is your OS? I have no problem here (WIN XP) , though there is another bug- trying to open a lnk file prevented filelist from loading.
I can't open any file stored in user Pictures folder. Always throw 'Error: File not found!'.
Remember that Pictures folder has a real path and a 'visual' path. One is, for example:
'C:\Users\User\Pictures'
And other is the translated, that's shown
'C:\Users\User\Mis imágenes'
(With the first two seems that there's no problem)
And other, shown when you acces the folder via explorer 'Library' shortcuts
'Bibliotecas\Imágenes'
No idea, because I can open files in 'Documents' Library folder with no problems, only the 'Pictures' Library folder has that.
Form.BorderStyle:=bsNone
Form.WindowState:=wsFullScreen
Please do post patches, I like patches. :)Patch is attached.
I wonder if it won't become too heavy. It will give it a try.
I would propose to use the image browser instead.
I suppose you may feel sad that your contribution was not applied.
Exactly. I will try some tests.
The image browser on my computer is faster to show than the open dialog, however it can be slow afterwards while making the thumbnails if there are big images. Is it what you are talking about?
Why are ALL conversations about LazPaint done in this single message thread!? It makes it impossible to find a specific topic, follow a discussion etc. %)I don't think there is a particular reason for that. Is it that you would like more clarity?
Perhaps somebody should start a Lazpaint newsgroup server...Not sure if you meant it as a joke or not, but on a serious note. I do host a NNTP news server, and have made offers before where I said I would host newsgroups for open source projects for free. So if Lazpaint project wanted to move discussions to a NNTP news server, all they need to do is ask.
Is it that you would like more clarity?Not just me, but yes. Somebody might search for a specific topic or issue or feature request regarding LazPaint. All you ever get is the monster of a thread. No easy way to navigate specific questions and answers. :-/
Of course I knew you ran a news server and that you prefer it for tiopf support. That's why I posted.Perhaps somebody should start a Lazpaint newsgroup server...Not sure if you meant it as a joke or not, but on a serious note. I do host a NNTP news server, and have made offers before where I said I would host newsgroups for open source projects for free. So if Lazpaint project wanted to move discussions to a NNTP news server, all they need to do is ask.
How different is a newsgroup server from a forum?You are kidding right? never used nntp? Better known as usenet? here take a look on one of the most used clients
I would be happy to have the discussions a bit more organised. In any case, I will think about creating new threads when a subject is raised here.
A factor to bear in mind is that not all ISPs support newsgroups. For instance my ISP (talktalk.co.uk) does not, though I don't know how common this is internationally.Isn't this only an issue if you're using your ISPs newsgroup server? In this case Graeme is offering use of his server...
A factor to bear in mind is that not all ISPs support newsgroups. For instance my ISP (talktalk.co.uk) does not, though I don't know how common this is internationally.My experience so far is that no isp is offering usenet access any more, and even if they do they do on a very limited set that might or might not include the comp.* tree.
Isn't this only an issue if you're using your ISPs newsgroup server? In this case Graeme is offering use of his server...
Oh ok so what is more is that message have a tree structure, isn't it?
How different is a newsgroup server from a forum?Wow, I must be showing my age then. :-)
A factor to bear in mind is that not all ISPs support newsgroups. For instance my ISP (talktalk.co.uk) does not, though I don't know how common this is internationally.I fail to understand what you mean? Can't you access existing NNTP news servers? I'm not talking about the 10,000+ USENET groups, I'm talking about any NNTP server (eg: try and access my server - details below). I can't imagine any ISP blocks such traffic - what would be their reasoning to do that?
Why are ALL conversations about LazPaint done in this single message thread!? It makes it impossible to find a specific topic, follow a discussion etc. %)
Exactly.
Using a newsgroup maybe it's ok, I don't know how much people will read the newsgroup vs read the forum (for example I will keep just reading the forum) just because I'm used to using forums, nothing more.
Why are ALL conversations about LazPaint done in this single message thread!? It makes it impossible to find a specific topic, follow a discussion etc. %)
I think it comes from the time when LazPaint did not have his own subforum. In Third Party forum..That could explain it, but that isn't the case any more, yet everybody still keeps posting to this single thread - like we are doing now. :-) Yet more variation of discussions - all under one topic.
Using a newsgroup maybe it's ok, I don't know how much people will read the newsgroup vs read the forum (for example I will keep just reading the forum) just because I'm used to using forums, nothing more.Don't you read emails? Don't you use mailing lists? If you do, you could use a Mail/News client combined - like Mozilla Thunderbird. All electronic communications in one applications. That's convenient.
Besides using a less known form of communication would repel users and hinder feedback.NNTP has a much longer history than web forums, and I have to disagree with your statement. The fpGUI, tiOPF, Embarcadero, OpenWatcom compiler and many other popular open source projects use NNTP to discuss development and support. They are all active and doing just fine.
Maybe circular needs to be moderator in this forum?I could reorganise some stuff, yes.
Using a newsgroup maybe it's ok, I don't know how much people will read the newsgroup vs read the forum (for example I will keep just reading the forum) just because I'm used to using forums, nothing more.I will still post about last changes on the monster thread, so if you are interested by one, you could then go in the newsgroup or not. If there is a web interface, I may even put direct links to the pages, that would be accessible without login as readonly.
...I came to the idea that I might borrow the idea of some Linux DEs, which IFAIK is implemented in Win7- clicking on a part of the path leads the user directly there.I am working on that, but is there someone to check if it will work on Mac?
but if you draw with fast mouse motion you get spearated brushes and not straight line .
maybe using dinput will avoid this problem (at least in windows)
I don't know if it works on Windows 64, Linux 64, MacOS 32 or MacOS 64.I compiled on MasOS32 (PPC) and it works. But the only thing I did was to fill the background with #000000.
It works on win 7 x 64 as far as i tested. There is no automatic test or something?Nope. It relies only on you and me. I don't even have a 64-bit computer, so automatic testing, well, no.
In spanish blur can be translated as desenfoqueWhy, isn't it translated?
var
app: TFileAssociation;
...
// if HKLM doesn't works try HKCU
if not app.Execute then
begin
app.RegisterForAllUsers := False;
app.Execute;
end;
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.
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.
procedure TFMain.FormUTF8KeyPress(Sender: TObject; var UTF8Key: LCLType.TUTF8Char);
When adding "LCLType." you get something like this:Code: [Select]procedure TFMain.FormUTF8KeyPress(Sender: TObject; var UTF8Key: LCLType.TUTF8Char);
I miss the Layer entry in the main menu. Does it sound reasonable to you to add it?
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 suppose Lazarus removes it before I commit changes to the repository. Also in the last version, it does not seem necessary.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.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?
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 hope I will be able to start working on that after 17.XII.
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.
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. %)
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.
Well, customizable menus are always a plus.Yep. 8)
I hope I will be able to start working on that after 17.XII.Ok. :)
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.Yes it is fixed.
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.
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.
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);
Ironically, optimizing a program takes time!
So there is a new version 6.4.1.While you guys are doing comparisons to Gimp and Photoshop, how does LazPaint (a program I still can't manage to compile for some or other reason) compare to Pixel Image Editor (previously known as Pixel32)? I've used Pixel for quite a while and it was very impressive with very good color management, effects, brushes, layers, supported platforms etc. I just don't know why Pavel Kanzelsberger suddenly disappeared and stopped Pixel development after 2007/8.
https://sourceforge.net/projects/lazpaint/files/src/
Hi circular,Hmm, my experience is limited. But definitely having a compiler that does the optimization for you is a great idea. Because an optimized code for SSE is kind of unreadable for a human. However, SSE instructions works for a small number of cases. For example when computing with arrays of single.
you have much experience with SSE.
May I ask about your opinion, how useful http://ispc.github.io
would be? I mean purely hypothetical (technical), for the unreal case
that it would not be a major digression.
While you guys are doing comparisons to Gimp and Photoshop, how does LazPaint compare to Pixel Image Editor (previously known as Pixel32)? I've used Pixel for quite a while and it was very impressive with very good color management, effects, brushes, layers, supported platforms etc.Pixel Image Editor provides more effects than LazPaint, and the "live effects" on layers gives it some taste of Photoshop. However tools are a bit limited. For example if you draw a rectangle, you cannot resize it. I did not find the text tool easy to use either. There is an undo but no redo. The file format support is also limited (could not load big JPEG files, nor PSD). So I would say that it is kind of unequal. If it had those things fixed, it would be better than LazPaint, and even kind of close to Photoshop. Of course it is not a free software, so that LazPaint would still be cheaper.
I just don't know why Pavel Kanzelsberger suddenly disappeared and stopped Pixel development after 2007/8.That's very surprising indeed. I guess that if he cannot continue this software for some reason, he could release the source code as opensource and let other people fix what needs to be fixed. Because for now, it is sad that this code is abandonned.
(a program I still can't manage to compile for some or other reason)What error do you get when trying to compile it?
I tried to build it under 64-bit FreeBSD. I can't remember the exact errors, but I think it was because it used lots of IFDEF LINUX in the code, thus making such code blocks unavailable for FreeBSD systems.Quote(a program I still can't manage to compile for some or other reason)What error do you get when trying to compile it?
There would be a need for an implementation of BGRABitmap for FreeBSD. Simply replacing IDEF LINUX by IFDEF UNIX may not work, unless there is also Gtk2 on FreeBSD?Yes, GTK2 exists for FreeBSD. Developing for Linux or FreeBSD (desktop apps) is near identical as they often run the same X11 software (Qt, GTK2/3, Gnome, etc)
Yes, GTK2 exists for FreeBSD. Developing for Linux or FreeBSD (desktop apps) is near identical as they often run the same X11 software (Qt, GTK2/3, Gnome, etc)Oh ok. Hmm, we cannot simply replace LINUX by UNIX because some fixes apply to Linux without applying to MacOS. We need to see each case separately. Where does the compilation stop? What line?
What confuses me is why there are so many IFDEF statements inside the (LCL based) application? It isn't as if LazPaint talks directly to hardware or the filesystem etc. So much for Lazarus's tag line of "write once, compiler everywhere"? ;-)Yes, it is not as simple as that. There are minor differences, for example in the way controls behave.
If you need someone to help test under FreeBSD, I don't mind.Yes, well you can be the person that test the software for FreeBSD. Testing may not be sufficient if there are particular things to fix. You can tell what does not work, but sometimes debugging is necessary.
Oh ok. Hmm, we cannot simply replace LINUX by UNIX because some fixes apply to Linux without applying to MacOS.Yeah, you will probably have to create new defines for UNIX (excluding OSX) and then DARWIN (OSX only).
Yes, it is not as simple as that. There are minor differences, for example in the way controls behave.But isn't that what the abstraction layer (LCL) is supposed to hide from the developer? A developer is supposed to simply code for the LCL API, and internally LCL will take care of the different backends. That is how fpGUI works - 99.99% of all fpGUI based applications have no IFDEF's needed in the application code.
Can you send me a screenshot of how FreeBSD renders fonts?Again, it works exactly like Linux. FreeBSD uses the exact same Xft/FreeType to render fonts. So hinting etc can also be tweaked to the user preference, just like under Linux.
By the way, does BGRABitmap works at all on FreeBSD?I haven't tried for a while. I'll update my local copies of BGRAControls, BGRABitmap and LazPaint and see how far it currently gets and let you know.
Yes, that is the goal and if that were true, that would make things easier.QuoteYes, it is not as simple as that. There are minor differences, for example in the way controls behave.But isn't that what the abstraction layer (LCL) is supposed to hide from the developer? A developer is supposed to simply code for the LCL API, and internally LCL will take care of the different backends.
That is how fpGUI works - 99.99% of all fpGUI based applications have no IFDEF's needed in the application code.Are you suggesting to change the GUI of LazPaint and to use fpGUI?
{$IFDEF LINUX}{$DEFINE LINUXLIKE}{$ENDIF}
{$IFDEF FREEBSD}{$DEFINE LINUXLIKE}{$ENDIF}
And then by replacing IFDEF LINUX by IFDEF LINUXLIKE.Again, it works exactly like Linux. FreeBSD uses the exact same Xft/FreeType to render fonts. So hinting etc can also be tweaked to the user preference, just like under Linux.Ok. I have looked at some screenshot using google search, it looks indeed like Linux. So I will apply the same level of antialiasing.
I haven't tried for a while. I'll update my local copies of BGRAControls, BGRABitmap and LazPaint and see how far it currently gets and let you know.Ok, but please try BGRABitmap separately. Test programs are provided on LazPaint code repository.
Are you suggesting to change the GUI of LazPaint and to use fpGUI?No, just stating the pitfalls with LCL and the false promises of write once, compiler everywhere. Other toolkits seem to manage that better than LCL.
If I set LazPaint to fpGUI, I get the following error:That's the LCL-fpGUI widgetset interface which I don't work on. Yes I contribute a patch here and there, but I prefer to use fpGUI directly (no LCL involved). This greatly reduces the executable size and has faster performance.
fpgui\fpguiwsdialogs.pp(39,3) Fatal: Can not find unit fpg_base used by FpGuiWSDialogs.
I am not sure if BGRABitmap works with fpGUI either.I've never looked at the BGRABitmap code so don't know the internal design or dependencies. I can add that I, and many others, have easily ported LCL and VCL components to fpGUI.
Are there example applications running with fpGUI?DocView (help viewer), UI Designer (visual forms designer), Maximus IDE (demo IDE) etc. fpGUI also has a lot of demos included.
Another solution is to use custom drawn controls when there are some compatibility problems. For now, the combobox of CustomDrawn package does not seem to work.The LCL-CustomDrawn is still pre-alpha stage as far as I'm concerned. It is definitely not in a usable state at the moment and still needs a lot of development work. Even the basic TEdit is still incomplete with mouse support, no default popup menu etc.
Ok, but please try BGRABitmap separately. Test programs are provided on LazPaint code repository.I'll let you know as soon as I have a moment.
No, just stating the pitfalls with LCL and the false promises of write once, compiler everywhere. Other toolkits seem to manage that better than LCL.Well it is a compromise to use the widgetset of the system.
I understand, however without this, it is much work to adapt an application to fpGUI. I see you did a great job with fpGUI and it would get much more recognition and usage with a seamless integration in LCL.QuoteIf I set LazPaint to fpGUI, I get the following error:That's the LCL-fpGUI widgetset interface which I don't work on. Yes I contribute a patch here and there, but I prefer to use fpGUI directly (no LCL involved). This greatly reduces the executable size and has faster performance.
fpgui\fpguiwsdialogs.pp(39,3) Fatal: Can not find unit fpg_base used by FpGuiWSDialogs.
BGRABitmap depends on the LCL. So you would say it is dirty?QuoteI am not sure if BGRABitmap works with fpGUI either.I've never looked at the BGRABitmap code so don't know the internal design or dependencies. I can add that I, and many others, have easily ported LCL and VCL components to fpGUI.
But thinking about it, if BGRABitmap has a similar clean design as AggPas, then it shouldn't be a problem.
AggPas is totally toolkit independent. There is just a small unit that brings AggPas+fpGUI or AggPas+LCL together (to convert the AggPas image buffer to the toolkit's TfpgImage or TImage), but they have no impact on the workings of AggPas itself. eg: I use AggPas easily for console apps too, like for generating graphs via a CGI app.That would be great to have an independent version of BGRABitmap as well. However I would like it to be one library. So maybe this could be possible with compiler directives.
DocView (help viewer), UI Designer (visual forms designer), Maximus IDE (demo IDE) etc. fpGUI also has a lot of demos included.Congratulations, that looks great.
BGRABitmap depends on the LCL. So you would say it is dirty?Yup. ;)
That would be great to have an independent version of BGRABitmap as well. However I would like it to be one library.It should be possible as AggPas shows. If you can get BRGABitmap independent of a GUI toolkit, I would even add it as an optional software rendering layer for fpGUI too. I've actually had requests for that before.
There is some challenge here, to do text rendering without LCL. For now, BGRABitmap uses TBitmap to render text.AggPas accomplishes that without problem. The code is there if you want to take a peek. ;)
So we see things differently!BGRABitmap depends on the LCL. So you would say it is dirty?Yup. ;)
I take a note of that.QuoteThat would be great to have an independent version of BGRABitmap as well. However I would like it to be one library.It should be possible as AggPas shows. If you can get BRGABitmap independent of a GUI toolkit, I would even add it as an optional software rendering layer for fpGUI too. I've actually had requests for that before.
Layers: Support for multiple layers, including non-destructive adjustment layers, masks and editable text layers
That's a good idea. I am not sure however how to make this compatible with OpenRaster. Text layers can still be rasterized when saved in OpenRaster. For adjustments layers, that seems less obvious.
; Windows XP compatibility
Root: HKLM; Subkey: "Software\Classes\LazPaint.AssocFile.bmp\Shell\CascadeMenu\Command"; ValueType: String; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Classes\LazPaint.AssocFile.bmp\Shell\CascadeMenu2\Command"; ValueType: String; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletekey
Hmm ok. Not so obvious those shell customizations!
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Cascading Menu]
"Icon"="C:\\Windows\\system32\\shell32.dll,-24"
"SubCommands"="A.Winver;A.Graphics.Tools.Menu;A.System.Tools.Menu;A.Text.Tools.Menu"
"Position"="Top"
; Command Store Entries
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Defrag]
"Icon"="dfrgui.exe"
"MUIVerb"="Defragmenter"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Defrag\Command]
@="dfrgui.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Disk.Cleanup]
"Icon"="cleanmgr.exe"
"MUIVerb"="Disk Cleanup"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Disk.Cleanup\Command]
@="cleanmgr.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Disk.Tools.Menu]
"Icon"="imageres.dll,-3"
"MUIVerb"="Disk Tools"
"SubCommands"="A.Defrag;A.Disk.Cleanup"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Graphics.Tools.Menu]
"Icon"="imageres.dll,-3"
"MUIVerb"="Graphics"
"SubCommands"="A.Paint;Windows.slideshow"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Msinfo]
"Icon"="msinfo32.exe"
"MUIVerb"="Open MS Info"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Msinfo\Command]
@="msinfo32.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Notepad]
"Icon"="notepad.exe"
"MUIVerb"="Open Notepad"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Notepad\Command]
@="notepad.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Paint]
"Icon"="mspaint.exe"
"MUIVerb"="Open Paint"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Paint\Command]
@="mspaint.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.System.Tools.Menu]
"Icon"="imageres.dll,-3"
"MUIVerb"="System"
"SubCommands"="A.Msinfo;A.Disk.Tools.Menu"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Text.Tools.Menu]
"SubCommands"="A.Notepad;A.Wordpad"
"MUIVerb"="Text"
"Icon"="imageres.dll,-3"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Winver]
"Icon"="Winver.exe"
"MUIVerb"="Windows Version"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Winver\Command]
@="winver.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Wordpad]
"MUIVerb"="Open Wordpad"
"Icon"="\"C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\A.Wordpad\Command]
@="wordpad.exe"
start lazpaint /New(1024,768)
start lazpaint %1 %~n1.jpg
For example, drag a .png file to the batch file and it will output a .jpg file with the same name in the same directory."C:\Program Files\LazPaint\lazpaint.exe" "%1" "%l.jpg"
to convert from any to jpg with right click menu with no use of batch files. The main problem is that the output file contains double extension. like myfile.png is converted to myfile.png.jpgI understand. I wonder if that would make sense to register from LazPaint application, so that one could change the content of the menu.
Well indeed I was thinking about changing the registry. I understand this thing about rights. I suppose if it is possible to register for current user, that's good enough.
I visited http://bgra-controls.sourceforge.net/ and was confronted with the Windows logo on the home page. Isn't LazPaint cross-platform?
DISCLAIMER: I have no problem with Windows, just asking?
{ Add 'App Paths' to run lazpaint quickly from ShellExecuteEx (batch files, run window [Windows + F] and OpenDocument() at lclintf) }
Assoc.WriteString('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lazpaint.exe', '', AppPath + ' "%1"');
Assoc.WriteString('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lazpaint.exe', '', AppPath);
The second Assoc.WriteString cancels the first one, doesn't it?
Great stuff!
I suppose that in the following code:Code: [Select]{ Add 'App Paths' to run lazpaint quickly from ShellExecuteEx (batch files, run window [Windows + F] and OpenDocument() at lclintf) }
The second Assoc.WriteString cancels the first one, doesn't it?
Assoc.WriteString('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lazpaint.exe', '', AppPath + ' "%1"');
Assoc.WriteString('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lazpaint.exe', '', AppPath);
Assoc.WriteString('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lazpaint.exe', '', AppPath + ' "%1"');
Assoc.WriteString('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lazpaint.exe', 'Path', AppPath);
Assoc.WriteString('SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\Shell\LazPaint.negative\Command', '', AppPath + ' "%1" /Negative "%1"');
{ 6.0 vista, 6.1 win 7, 6.2 win 8, 6.3 win 8.1, 10 win 10 }
Win7 := False;
if (Win32MajorVersion = dword(6)) and (Win32MinorVersion >= dword(1)) then // Win7, Win8, Win8.1
Win7 := True;
if (Win32MajorVersion > dword(6)) then // Newer (windows 10)
Win7 := True;
function TFileAssociation.DeleteValue(SubKey: string; ValueName: string): boolean;
begin
Result := FRegistry.OpenKey(SubKey, True);
if Result then
begin
FRegistry.DeleteValue(ValueName);
FRegistry.DeleteKey(ValueName);
FRegistry.CloseKey;
end;
end;
FRegistry.DeleteKey(SubKey) if empty
Also I'm making my own 'setup system', already working, is not advanced at all and not to be like inno setup (IMHO the most powerful one), just for fun. It can install and uninstall. Is interesting at least.Wow, that's great!
LOL I just noticed that the forum replaced my [ code ] with the forum tag of the same name in my last post, I mean 'code section' from iss script.Yes, I figured it out. I suppose you can still edit your message so that it would appear as you intended.
That's right 007. We could have one less dependency.
Indeed, the online connection is just used to check for the version and download language files. It is a simple HTTP request.
However it is in a thread. I suppose it would be possible to do the query in a thread.
Regards
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
fphttpclient;
type
{ TForm1 }
{ TDownloadFile }
TDownloadFile = class(TThread)
protected
procedure Execute; override;
end;
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
DownloadT: TDownloadFile;
procedure OnTerminate(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
Button1.Enabled := False;
FreeAndNil(DownloadT);
DownloadT := TDownloadFile.Create(False);
DownloadT.OnTerminate := @OnTerminate;
end;
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
FreeAndNil(DownloadT);
end;
procedure TForm1.OnTerminate(Sender: TObject);
begin
if FileExistsUTF8(ExtractFilePath(ParamStr(0)) + 'File.html') then
ShowMessage('File.html saved!');
Button1.Enabled := True;
end;
{ TDownloadFile }
procedure TDownloadFile.Execute;
var
TheFile: TStringList;
begin
try
TheFile := TStringList.Create;
TFPHTTPClient.SimpleGet('http://lazpaint.sourceforge.net/latest.txt',
TheFile);
TheFile.SaveToFile('File.html');
finally
TheFile.Free;
end;
end;
That's good to know. Thank you! :)
Quite nice!
It looks definitely like Photoshop.
Hi!
Done on SVN : LazPaint does not depend on LNet anymore but use TFPHTTPClient to get updates.
I've updated the .LPI project file. Does that fix the dependency?
I've drawn this with LazPaint, with Layers, filters, renders, a lot of tools used.btw nice draw! :)
About the ratio for other shapes, I thought your request was only for selections and also my worry was about taking up to much space in the toolbar. It already takes the whole width of the screen.btw yes, the tool options in the toolbar it's a bit messy, don't you think?
1. Not sure where you're going with this. From the screenshot, I infer you are suggesting that one could select the visible area from the layer stack?Yup, although perhaps having a thumbnail as minimap in all layers will overload the interface?
2. I get your point. Note that you can add a new empty layer and paste the selection there.Heh I see, anyway I think is better if the new layer is pasted in the center of the view and not the canvas, if we want put in the canvas center just make the full view :P
Though from reading winni I have the impression it is another thing, like inserting a series of point. Would it be like splitting a segment in equal parts?
Image made with newest LazPaint attached.Interesting ... very nice. :)
Thanks =)QuoteImage made with newest LazPaint attached.Interesting ... very nice. :)
@lainz
you can add name the application to metadata ?
This is a png file it can have metadata as well?
p1.x:= Units.ConvertWidth(g.x1,AUnit,w).value;
p1.y:= Units.ConvertHeight(g.y1,AUnit,h).value;
p2.x:= Units.ConvertWidth(g.x1,AUnit,w).value;
p2.y:= Units.ConvertHeight(g.y1,AUnit,h).value;
...should be... p1.x:= Units.ConvertWidth(g.x1,AUnit,w).value;
p1.y:= Units.ConvertHeight(g.y1,AUnit,h).value;
p2.x:= Units.ConvertWidth(g.x2,AUnit,w).value; <- change here
p2.y:= Units.ConvertHeight(g.y2,AUnit,h).value; <- change here
Please fix an issue with the linear gradients of svg, which seems to be not painted, but it's only a size issue.
The issue is in "TSVGElementWithGradient.CreateCanvasLinearGradient(...)" and this code...Code: [Select]p1.x:= Units.ConvertWidth(g.x1,AUnit,w).value;
...should be...
p1.y:= Units.ConvertHeight(g.y1,AUnit,h).value;
p2.x:= Units.ConvertWidth(g.x1,AUnit,w).value;
p2.y:= Units.ConvertHeight(g.y1,AUnit,h).value;Code: [Select]p1.x:= Units.ConvertWidth(g.x1,AUnit,w).value;
p1.y:= Units.ConvertHeight(g.y1,AUnit,h).value;
p2.x:= Units.ConvertWidth(g.x2,AUnit,w).value; <- change here
p2.y:= Units.ConvertHeight(g.y2,AUnit,h).value; <- change here
After these changes the linear gradients will be painted as expected.
Download and try to open this image in LazPaint
https://github.com/crystal-bit/triple-triad-godot/blob/master/GameScenes/Battle/Textures/field.png
Hi!
Lazpaint moans: "CRC check faild"
Gimp opens it with no issues.
If I open it with mspaint and then save it as PNG, then open it with lazpaint works.
The file size differs BTW:
original file 2335kb
saved with mspaint 2573kb
Hmm, and precisely that's the chunk for ICC profile that has bad CRC.result:
strings field.png | grep Photoshop
Photoshop ICC profile
So: Yes, Photoshop delivers corrupt png files.
how is the status of the lazpaint scripting with python?It's going well. I am 80% done I guess.
It's going well. I am 80% done I guess.
I think LazPaint is already good :)Yeah, LazPaint is really cool.
Also made 99.9% by only one person.
Yeah, LazPaint is really cool.
Its interface, one of the points that I most criticize, I find it very comfortable indeed, but at the same time I feel that it can be better.
btw, I wonder how the hell it'll keep the interface nice by mixing raster and vectors, but it's probably going to be a cool thing too :)
Well maye I was wrong, I found now that in Spanish is 'antiplegamiento' that has less sense to me. But the reason of my confusion was that when I was younger I see that word 'antiafilado' in a nvidia videocard box :-[ I presume wrong translation or there was no other translation in that time. Please check if in lazpaint is correctly translated into 'antiplegamiento' or better use anti-aliasing that's widely known.
ETA: though I don't know if afilar is the antialiasing or if it is sharpening
So for me have more sense make default the aliased.Nope. Most people wants nice graphics. It is only if you know what you are doing that you would want to have aliasing.
Anti-alias: Alisado, I prefer that one (like used in the GIMP screenshots), that translation has sense, and we remove the "anti" problem of negating 'Afilado' or 'Pixelado'.Ok, sounds good to me.
Afilado: is like it has noticeable borders, like a pencil point, a sharp knife, etc. So the meaning is correct for this case.
So for me have more sense make default the aliased.
Ok, sounds good to me.
So antialiased = alisado and antialiasing = alisamiento
And aliased = afilado
@garlar: no estoy seguro de que este "afilar" es a propocito de antialiasing.Sorry, its almost 25 years since the last time I played with image editing :-[
Cuando se trace una ruta, es escrito anti-alias:
About gradient fill in shapes, that's already in dev branch. You can as well use a texture.Great! :D
About merging shapes, that may be possible, though not so obvious. You can add a ticket for that, though I am not sure how this would pan out.Sorry, I think I didn't expressed correctly my idea.
I think this version is ready for testing so I will publish binaries very soon.I'm really excited about the next version, I think it's gonna be really great :D
The idea basically is allow make in the shapes interceptions/connect points.I think I got it. That's very interesting. I wonder how to implement the rendering of that.
For example, see how it works in a 3D modeler like Wings3D
https://i.ibb.co/rcpx5fK/shape-with-interceptions.gif
We can already add new points and move them, but no connect them
I must admit that at first I was a little confused about a few things with the new versionYeah there are some changes though hopefully for the better.
as how close the shape, however I think have more sense now :)
or about how works the gradient now, Indeed I thought for a moment that the tool itself had been removed, for only the option of making gradients by means of shapes or lines, but then I saw that it was grouped with the eraser heh ;P
Filling in the shapes with gradients is really cool, though I taked a little practice to understand how various things work :)
Finally the colors and layers are well docked haha:D Indeed
I think are many things to comment, but is really good this new version :DThanx
Btw, this is a problem from before, the selection don't works in the corners or close from (selection area is limited as 70% from center?)Yeah because when using the corner to resize, it is better to have the mouse on the corner. Otherwise I think that when you rotate the shape (using right-click) than can be a bit confusing.
https://i.ibb.co/r540jnq/lazpaint-selections-Limits.gif
Is possible to have the ability to export/save in vectorial image format? as SVG.That's a possible improvement. Though if you have raster stuff in there, the SVG file could get very large.
btw, this svg image is not opened properly
https://upload.wikimedia.org/wikipedia/commons/3/30/Vector-based_example.svg
That's a possible improvement. Though if you have raster stuff in there, the SVG file could get very large.I understand, however it would be great.
Please add a option to resize a layer individually, I know we can make this with the tool in layers, but sometimes we need resize a layer with some specific value and make this by hand can be a bit complicated.That is a bit like what you are asking for shapes, so maybe I will make it the same way like editing the status bar.
I think something as a selector in the resize window to select all or "x layer" can be enough :
Add button to zoom 1:1, I guess with the asteric * in numeric keyboardOh you're talking about adding a shortcut key. Ok. Good idea.
Other to zoom to fit in window? the divide in numeric keyboard? :P
The zoom to fit in the window, I think can be nice if also centers the image too
pyw thescript.py
About the noise, I think there is the one you're looking for. In Filter > Noise filter.Oh, the noise is in filters, yeah that is! :D
If you find bugs please tell me!Ah actually I found one that I forgot to comment on before.
Editing SVG may be too complicated but converting it as LazPaint vector is something I thought about. The problem is that first I need to add a Path shape in LazPaint. And for that I need to implement the arc transforms.I see, well I hope we can see this in the future, although it is not a high priority it would be quite useful.
That's some cool ideas of script there. Well, would you like to try to write some?Yeah, I will make my questions about scripts here later :)
Yes you can try the noise filter is the most easy to do.Good, I'll keep this in mind, will be useful :)
Just random number between 0 and 1. between 0 and 0.5 use black and if greater than 0.5 use white.
You can change the threshold (0.5) to have more black or more white.
Ah actually I found one that I forgot to comment on before.Ah indeed, same thing on Linux. But we have already done the binaries. I will ask if it is ok with Lainz to make a new version.
The scroll with middle mouse button it is not completely corrected, at least not in windows, the scroll with this button is locked if if we select a different tool than the "hand" (Move and scroll picture tool)
I guess you can check this with Reactos or Wine.
I suggest to create a thread for that.Quote from: circularThat's some cool ideas of script there. Well, would you like to try to write some?Yeah, I will make my questions about scripts here later :)
That was Lainz quote. :-[Quote from: circularYes you can try the noise filter is the most easy to do.Good, I'll keep this in mind, will be useful :)
Just random number between 0 and 1. between 0 and 0.5 use black and if greater than 0.5 use white.
You can change the threshold (0.5) to have more black or more white.
New STABLE version of LazPaint 7.1.1
https://github.com/bgrabitmap/lazpaint/releases
8-)
What's new compared to previous stable version 7.0.7:
Files
* read/write support for WebP images using libwebp
* read support for RAW images using dcraw
* read support for Portable Any Map (PBM, PGM, PPM)
* fix loading PDN images
* show progress of loading/saving/actions on layered images
Interface
* less flickering during action progress
* minor scaling improvements
* dark theme for status bar
* add Donate tool button
* separate color for background and outline
* fix remember save file extension
Tools
* fix updating transparent colors
* fix release of middle mouse button
* fix gradient undo/redo
* optimize layer transform
* scripting in Python
* script for layer effects: color overlay, drop shadow, inner light, stroke
* more scripts: split/merge channels, mask
* vectorial tools: gradient and texture fill for vectorial shapes
* paste vector shapes within visible bounds
* align to pixels when image is not zoomed
* grouping of tool items in toolbar
* added polyline and opened curve tool
* pen tool: SHIFT click to retrieve color, ALT+wheel to change width
* selection pen tool: add antialiasing option
* color picker: SHIFT click to retrieve color of flattened image
* eraser tool: added lighten, darken and sharpen modes
* floodfill tool: makes vector original on an empty layer, preserve vector layer
* edit shape tool: show shape information
* edit shape tool: multiselection of shapes
* polygon tool: highlight hovered point, arrows to move points
* text tool: added font aliasing option
* text tool: fix handling of keys
* gradient tool: replace layer by gradient if it is opaque
Windows
* ensure toolwindows in front when restoring app
* palette: indicate last added color in palette
* palette: fix scroll bug
* color window resizable
* color and layer windows dockable to main window
* don't undock windows when going fullscreen
* adjust more windows to system DPI
* adjust curves: show source histograms
* filter function: optimize, add Lab colorspace, add min/max/avg
* blend operations: add Saturation (HSL) and Mask blend operation
Translations
* added Latvian
* completed Kabyle and Bulgarian
* added Kabyle language
* updated Swedish translation
Miscellaneous
* rendering optimizations to reduce slowdown with big images
* fixes for image browser
* command line: parenthesis optional to make it Linux-friendly
Glad you like it :)
Hmm I suppose some shortcuts could be added, though network drives do not appear when you click the "Select drive" button?
Hmm but you have network drives defined like D: E: etc.?
Oh ok, so maybe what would suit your need would be a network button that shows the computers on the network?
Something wich I found cool in RWPaint is that your file explorer is integrated in the main window, it does not open a new window as such.
A mockup ideaI get the idea, though I am not motivated to do such change because it is already nice. I don't mind my software being a bit different.
https://i.ibb.co/DYWGyvd/imagebrowser-mod.png
The "save" dialog wastes unnecessary spaceWell that works in this case, but save a JPEG and more space is used on the left side.
https://i.ibb.co/09BQ5TF/savedialog.png
Another mouckup idea :)
https://i.ibb.co/KyMnbXY/savedialog-mod.png
I get the idea, though I am not motivated to do such change because it is already nice. I don't mind my software being a bit different.Heh it's ok then :)
Well that works in this case, but save a JPEG and more space is used on the left side.https://i.ibb.co/Zm9wcM9/savejpg.png
The Linux32 deb and no install seems that has a big download size? Maybe it has debugging data inside?Ooops that's probably that. I am fixing it now.
BGRAFreeType is not used for now in LazPaint, so that doesn't matter.
Though you wouldn't have to do that. Trunk is not stable so I would rather avoid using it to release binaries. Rather user 2.0.8 where the code for CharKerning will be disabled by a compiler directive.
Talking about night sky, here is a picture I just made with LazPaintHaha I had not seen it until now, cool :D
With that in mind, I think could be nice a "Vector pen" drawing tool in Lazpaint, you know, we draw as with the simple pen, but then this is converted to 'Opened curve'Interesting. I've added the issue:
There should be some information that the print job is in the pipe.Good idea. I've added a popup message and a counter for the number of times it has been sent to the printer.
* Play a Beep
* Change the color of the print dialog
* or just close it.
Interesting. I've added the issue:Thanks :D
https://github.com/bgrabitmap/lazpaint/issues/194
Anyone else has tested a bit version 7.1.4?
This is what I get when I open it win64, I'm using FPC 3.3.1Do you get the same display problem with FPC 3.2.0 ?
CMYK works fine.Cool.
Another screenshot, this time using the command help.Can you try that with debug compilation in order to have names in the stack trace ?
This is what I get when I open it win64, I'm using FPC 3.3.1Do you get the same display problem with FPC 3.2.0 ?
QuoteAnother screenshot, this time using the command help.Can you try that with debug compilation in order to have names in the stack trace ?
Well I only need the first window. Ok so that's related to writeln on the standard output. Is it related to Powershell that there would not be any standard output? What if you try with a regular terminal?QuoteCan you try that with debug compilation in order to have names in the stack trace ?Well there are more than 10 windows shown when I show the stack trace. Here is the first.
Well I only need the first window. Ok so that's related to writeln on the standard output. Is it related to Powershell that there would not be any standard output? What if you try with a regular terminal?
Hello.Cool. I notice the text on the status bar hides the white bevel line. Does it solve that to add
Here result of LazPaint for win 32 and 64 (for Linux it is ok too).
I did compile it using lazpaint.prj and fpc 3.2.0.
Hello.Cool. I notice the text on the status bar hides the white bevel line. Does it solve that to add
Here result of LazPaint for win 32 and 64 (for Linux it is ok too).
I did compile it using lazpaint.prj and fpc 3.2.0.on line 338 of umainformlayout.pas? (in procedure StatusBar_Paint inside the first if statement)
FStatusBar.Canvas.Brush.Style := bsClear;
?
@lainz
Hmmmm.... ok. What if you replace WriteLn by DebugLn on line 230 of UCommandLine?
EDIT: maybe it is not possible to do a hybrid program console/GUI on Windows with Lazarus
Maybe you can do as some other windows application does, using the command --help shows a Dialog (ShowMessage).Sure though that would be a big dialog. Probably would need to create a form with a memo in it. I guess I will do that.
Maybe you can do as some other windows application does, using the command --help shows a Dialog (ShowMessage).Sure though that would be a big dialog. Probably would need to create a form with a memo in it. I guess I will do that.
I don't see really missing information in the project in version information.
Huh, do you know that fpc has now a fully working independent fpcres that will not oblige Unix users to use windres?Great news :)
(And so remove all the problems when "lazpaint.res not found" appears in compilation).
O:-)
I've installed a VM with Win 10 on MacOS to debug the display problem. Hopefully Cortana and Siri are not going to have fight with each other.
They don't fight, they say things off screen of each other.:D
Thanks. Just to check, are those made with the master branches? I have changed some things in the dev branches of BGRABitmap, BGRAControls and LazPaint but that's for next releases.
Cool :)to day see this video
Always great to get some press coverage :-*
Sure. Won't have time as new week starts, but feel free to experiment. You may need to regenerate the site with Hugo.
Hi, can someone with old versions of Safari can test https://lazpaint.github.io/
Seems that webp was added recently in Safari. So you will notice that the site does not have images. If that's the case I will revert the changes.
Oh I see. Missing downloads.Sure, with pleasure.
Can you help us with that?
In the lazpaint repository there is the website template. Just add the links, I'm sure these files has the same naming convention as the others.Huh, sorry, but I dont find the code of the site in lazpaint repository.
Hi, thanks, everything seems working fine. The website must be online in some minutes.
Hi! I tested the site on an iPhone 6 and the images do not appear. So I suggest to revert to previous formats. For the big background image, I suppose a low quality JPEG will do.
One thing I miss in Lazpaint is the option „New in a new instance“.Yes indeed it must be much better to have that new instance option and some hotkey.
So I have to run LazPaint once more the OS start menu, and then create a new file.
It would be even better if I could also create a new image in a new tab, but I believe that implementing that feature would require much more work.I did an ticket in github about this already :)
Sure, the current Lazpaint is prety nice, I comment the ideas just to have them written down and to see opinions :)
About the Porter/Duff compositing, I looked at actual software implementation, what I found is the ability to exclude the alpha channel (which amounts to the "atop" mode) and the ability to use a mask (which amounts to the "dest-in" mode). This is possible for example in Krita and Photoshop. In fact it possible to exclude any other channel as well (red/green/blue). Thinking about it, most other Porter/Duff are not necessary, here is how to achieve them using the layer structure, exclude channel and mask:
- "source": hide layers underneath
- "atop": exclude alpha channel
- "over": nothing special to do
- "in": use the layer underneath (its alpha channel) as mask
- "dest": make the layer on top invisible
- "dest-over": switch layer positions
- "dest-atop": switch layer positions and exclude alpha channel
- "dest-in": use the layer on top (its alpha channel) as a mask
- "clear" make all layers invisible
The modes "out", "dest-out" are similar to "in" and "dest-in" but with mask inversion. The "xor" mode is the only one that is not possible to do.
I have just come across a bug in the printing settings (v.7.1.6 64 Bit on Win10 64Bit):You could instead move the image by clicking and moving it in the page.
I tried to print an image on the right side of the page, so I tried to set so higher value of the Left border... and it occurred that I cannot set more than 100 (by the up/down button). And after I entered some value manually, the preview stopped updating (I changed multiple times the values of the left border, but the preview kept showing the same).
Some (more) ideas I'd like to see in LazPaint.Yes that's classical Bézier curves. I am thinking also about adding it.
The current way to make shapes,curves in Lazpaint is indeed pretty nice, however it is something different from the traditional way that all the programs have implemented, I'm not sure how to describe this, basically the points that make the shape are controlled by external lines?
Yes that's classical Bézier curves. I am thinking also about adding it.Oh nice then :D
Being able to see vectors rendered as vectors (and not raster) in LazPaint.
I assume that this may add up some use of extra resources required to LazPaint, so as an option it would also be great.
Vector rendering in LazPaint
https://i.ibb.co/SfGwJ5p/lazpaint-vector-rendering.gif
Vector rendering in Affinity Designer
https://i.ibb.co/vBjLfs6/affinity-vector-rendering.gif
The zoom here is freaking awesome +980000% :o
Some (more) ideas I'd like to see in LazPaint.
The current way to make shapes,curves in Lazpaint is indeed pretty nice, however it is something different from the traditional way that all the programs have implemented, I'm not sure how to describe this, basically the points that make the shape are controlled by external lines?
https://i.ibb.co/GcVk4Lw/curvers-vector12510.png
Here some examples
In Photoshop
https://i.ibb.co/tqFVx21/photoshop-curves2.gif
In Inkscape
https://i.ibb.co/vDvJ1kG/Inkscape-curves.gif
In Affinity Designer
https://i.ibb.co/4gDVbKc/affinity-designer-curves.gif
Again, the current LazPaint way is indeed pretty nice and original, however I think can be great have some option to make that things as with the other programs, without losing the possibility of also using the current way in which lazpaint does.
For my projects I manage snapcraft.yaml directly in repo. For projects of others on github I create a fork so I can do additional changes without need to propagate all needed changes to upstream repo. But currently I build those snaps only locally with cloned repo. It is also possible to configure snap to download files directly from git repo. This may be needed for example to setup automatic snap builds on Launchpad. But as I am still doing research how to create Lazarus snaps properly, I rather use locally downloaded project files.Got it.
I record my finding in wiki page https://wiki.freepascal.org/Create_snap_package Still work in progress.Great stuff. So we have Debian packages and Snap packages!
Do you have some promotion video which could be used on snap page?There are various videos for different features. Not really one that would be generic.
Also I tried to find some good description of the application but I've found only some partial information on various web sites.There are some updates that could be done to descriptions indeed. Though it is already good. Maybe we could add mention of layer effects.
There can be also "Featured banner" added with some size restrictions.
I can also share administration access for the snap with you so you can update its listing and see metrics. I just need your email and you need to have/create ubuntu account.Sure. I am thinking as well about giving you access to the GitHub repository. For now though we can rely on pull requests I guess, but at the same time, I like the idea of having multiple people being able to handle things.
lazpaint -screenshot 0 -editor [Window]ColorWindowVisible=0,LayerWindowVisible=0 screenshot.png
...If fpexprpars is used for that, you are welcome to press a thumb up in this feature request: 39351 (https://gitlab.com/freepascal.org/fpc/source/-/issues/39351)
It is normal that the regional settings are ignored.
Hello, Circular. Will you consider to make lazpaint support paint.net(free image editor https://www.getpaint.net/ ) plugins ?.
Paint.net has different useful plugins(https://forums.getpaint.net/topic/15260-plugin-index/) on their website made by its community. Paint.net is made for windows platform but lazpaint is made for cross-platform but It will be useful for windows users of lazpaint and if there is a way to make them work in other OS platforms also it will be awesome.
Some of the plugins I love from paint.net community are:
1) https://forums.getpaint.net/topic/26553-trs-displacement-map-3d-version-21/
2) https://forums.getpaint.net/topic/26685-trs-scatter-plugin-v13/
3) https://forums.getpaint.net/topic/20688-liquify/
4) https://forums.getpaint.net/topic/10634-smudge/
I have listed them in order to show usefulness of paint.net community plugins. Lazpaint is simple, useful and intuitive and if it can support paint.net plugins it will be more useful. Just now I found that paint.net is free but not opensource from release 3.20. So I think implementing what I said will be difficult.
Have a nice day.
That from the official site. So all plug-ins are not cross platform.I think the requestor only wants the support for Windows platform anyway, although I agree it shouldn't be that way. What could be problematic is that those DLLs are not native, they're managed DLLs that depend on .NET runtime. You will need a bootstrap .NET executable to load and convert them into native code in memory (a do nothing program will do, so long as the linking is static), only then you load LoadLibrary as usual.
Yes, linking is the main challenge. As you point out, an embedding program that run the plugins could be the way to go:That from the official site. So all plug-ins are not cross platform.I think the requestor only wants the support for Windows platform anyway, although I agree it shouldn't be that way. What could be problematic is that those DLLs are not native, they're managed DLLs that depend on .NET runtime. You will need a bootstrap .NET executable to load and convert them into native code in memory (a do nothing program will do, so long as the linking is static), only then you load LoadLibrary as usual.
What is ClearType filter and when it is useful. I read that it does displacement of RGB channels. I think it is for creating glitch effect by moving RGB channels by some values. When I applied it to an image nothing seems to happen. :)
Thanks circular. I will reupload it by applying denoise filter. Have a nice day. :)
Updated video: https://youtu.be/DroWZmB9nXY