Jump to content

vPaint - GDI+ image editor


scintilla4evr
 Share

Recommended Posts

Sorry for the delays. I'm working on my school website and it's taking my whole time and attention. But, since it's holiday in Poland, I'm back here with the new version:

v4_alpha2.png

Changes in this version are:

  • Fixed selection problem (when you had multiple selections and tried to choose one of them in the Objects panel, vPaint crashed)
  • Added paths and a separate tool for creating and editing them.

 

vPaint 4 image editor

Note: Selections and paths are not saved in the V4I file for now.

Edited by scintilla4evr
Fixed screenshot
Link to comment
Share on other sites

Hello @scintilla4evr

Again very good update.
I also have holiday a the same time :)

regards,
mLipok

 

btw.
Please fix your signature (spoiler)

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • 2 weeks later...

New version:

  • Added path-to-selection conversion (see path context menu in Objects panel)
  • Recompiled Interference and fixed some problems with it (now works on Windows 7)
  • Paths in the viewport are now antialiased
  • Paths can be hidden

v4_alpha3.png

vPaint 4 image editor

Link to comment
Share on other sites

Another update:

  • Fixed selection and path behavior after cropping the image
  • Added path-to-layer conversion
  • Masking layers with paths
  • Fixed font problems (finally, I hope)

v4_3_9_10_1.jpg

vPaint 4 image editor

PS. @UEZ, can I use your BitmapApplyFilter UDF in vPaint, please? Your name will be written all over the About window.

Link to comment
Share on other sites

7 minutes ago, scintilla4evr said:

PS. @UEZ, can I use your BitmapApplyFilter UDF in vPaint, please? Your name will be written all over the About window.

Sure, that's the reason why I published it. ^_^ Further I came also to my mind with your script...

I will release in a few minutes the latest version with two additional blur filter.

 

Edit: the GUI seems to work now. :thumbsup:

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

52 minutes ago, UEZ said:

Edit: the GUI seems to work now. :thumbsup:

FINALLY!

Another update for today:

  • Layer renaming and opacity (right-click the layer in the list and select 'Layer options')
  • Layer blending modes (SLOW AS HELL!)

v4_3_9_10_2.jpg

 

vPaint 4 image editor

PS. UEZ's BitmapApplyFilter UDF seems to have problems with vPaint. I'll try to tackle that tomorrow.

Edit: I've just noticed that 'Objects' is 'About...' in the right pane. I'll fix that in the next update. Fixed.

Edited by scintilla4evr
Link to comment
Share on other sites

Update time:

  • Blending modes now support opacity
  • Added channel routing (only for Normal blending mode, available in the layer context menu)

v4_3_9_10_3.jpg

vPaint 4 image editor

Link to comment
Share on other sites

On 7/9/2016 at 11:04 PM, scintilla4evr said:

PS. UEZ's BitmapApplyFilter UDF seems to have problems with vPaint. I'll try to tackle that tomorrow.

Any update on this issue?

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

54 minutes ago, UEZ said:

Any update on this issue?

Still no idea why your DLL causes vPaint to crash. I think I'll make another DLL to call your DLL to check if it will work. In the end, I'll end up drowning in a sea of DLLs.

Link to comment
Share on other sites

How you are calling the functions? Be careful with the last parameter which returns either a GDI+ or GDI bitmap!

If you are going to use GDI with GDI+ or vice versa your script will crash!

 

In my examples the returned bitmaps are always GDI format!

 

 

Btw, vPaint is very unstable - it crashes very often. :mellow:

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

It turns out, that the DLL doesn't work when it is not in the same directory as the main script is.

And the day when vPaint will not crash, will be the day when a giant pink meteorite will hit the moon and turn it into a daffodil.

Link to comment
Share on other sites

15 minutes ago, scintilla4evr said:

 

It turns out, that the DLL doesn't work when it is not in the same directory as the main script is.

 

You can add the path to the DLL in _GDIPlus_BitmapApplyFilter_Open(<path to DLL>) function. Have you tried it?

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Just now, UEZ said:

You can add the path to the DLL in _GDIPlus_BitmapApplyFilter_Open(<path to DLL>) function. Have you tried it?

Yes. I examined the code more closely and it turns out that the problem was somewhere else. It was the fact that vPaint loads bundled GDI+ DLL from Data\Libraries.

Link to comment
Share on other sites

3.9.12:

  • Layers and paths now are properly saved in the V4I file
  • New color picker
  • Paths as layers
  • Collapsible sections in Objects panel

v4_3_9_12.jpg

vPaint 4 image editor

PS. New V4I format is not backwards compatible with the previous one.

Link to comment
Share on other sites

In this function:

Func _D2D1_CreateStrokeStyle($oFactory, $oProperties, $aDashes = 0)
    If IsArray($aDashes) Then
        Local $tDashes = __D2D1_CreateDashes($aDashes)
        $tDashes = $tDashes()
        Local $iDashCount = $aDashes[0]
    Else
        Local $tDashes = 0
        Local $iDashCount = 0
    EndIf
    Local $aCall = $oFactory.CreateStrokeStyle($oProperties(), $tDashes, $iDashCount, 0)

    Return $aCall[4]
EndFunc

You redeclaring the same variable.

Tryt to change code like this:

Func _D2D1_CreateStrokeStyle($oFactory, $oProperties, $aDashes = 0)
    Local $tDashes = 0
    Local $iDashCount = 0
    If IsArray($aDashes) Then
        $tDashes = __D2D1_CreateDashes($aDashes)
        $tDashes = $tDashes()
        $iDashCount = $aDashes[0]
    EndIf
    
    Local $aCall = $oFactory.CreateStrokeStyle($oProperties(), $tDashes, $iDashCount, 0)

    Return $aCall[4]
EndFunc

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

And some errors:
 

Quote

"C:\Users\user\Downloads\26-07-2016 (3.9.12)\Base\Utilities.au3" (20) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

Quote

"C:\Users\user\Downloads\26-07-2016 (3.9.12)\Base\Drawing\Tools\Brush.au3" (60) : ==> Variable used without being declared.:

Quote

!>19:48:59 AutoIt3.exe ended.rc:255

The last error is related to MagicWand selection tool.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

2 hours ago, mLipok said:

And some errors:
 

The last error is related to MagicWand selection tool.

 

Oh yes, I have to make this function iterative, because of the maximum recursion level in Au3 (it was 3800 I think).

Link to comment
Share on other sites

8 hours ago, scintilla4evr said:

(it was 3800 I think)

No, there is no hard limit set on recursion level in AutoIt. See this topic for more info on this:

 

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...