[Editor/Code Generator] Gdip Bitmap Maker (v0.1.8 March 29th, 2020)

Post your working scripts, libraries and tools
User avatar
Frosti
Posts: 350
Joined: 27 Oct 2017, 14:30
GitHub: Ixiko

Re: [Editor] Gdip Bitmap Maker

28 Mar 2019, 09:23

Amazing project!
Looks like a step towards an autohotkey svg viewer / wrapper.
User avatar
Hellbent
Posts: 1058
Joined: 23 Sep 2017, 13:34

Re: [Editor] Gdip Bitmap Maker

06 Jun 2019, 07:20

Updated to: v0.1.7 June 6th, 2019
---------------------------------------------------------------------------------------------------------------
- Fixed Major Memory Leak. (program should no longer crash after working on a bitmap for extended periods).
- Added refactored code submitted by Speed Master
- Added extra hotkeys submitted by Speed Master (See Speed Masters post on page 1 of this thread for hotkeys)
- Added a save progress bar to the save tab - can now see the save progress.
- Removed +AlwaysOnTop option.
- Added CREDITS DDL to tab 6. A temp way to credit people that have contributed to this project.
- Other small changes
------------------------------------------------------------------------------------------------------------------

Delta Pythagorean wrote:
28 Mar 2019, 03:17
Any chance you could add the ability do add images?
It is on my To-Do list, but I don't know when i'll get around to it.
If you know how to add it in, submit the code and i'll update the thread.
Frosti wrote:
28 Mar 2019, 09:23
Amazing project!
Looks like a step towards an autohotkey svg viewer / wrapper.
Thanks Frosti.
I don't think it will ever get to that point, but drawing with GDIP is made less of a chore with it.





If anyone has any comments, suggestions, examples that you have made using this, etc. Feel free to post them.
robodesign
Posts: 677
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Editor] Gdip Bitmap Maker

06 Jun 2019, 16:51

Will you make the user interface more friendly? The YouTube video showed a very geeky interface ^_^
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Hellbent
Posts: 1058
Joined: 23 Sep 2017, 13:34

Re: [Editor] Gdip Bitmap Maker

06 Jun 2019, 17:59

robodesign wrote:
06 Jun 2019, 16:51
a very geeky interface ^_^
I'm a geeky guy that likes his geeky interfaces.

So it will always have a geeky interface, cause that's how I like it, all geeky and what not, I just geek all out on it.
On the bright side, at least it's not nerdy...
robodesign
Posts: 677
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Editor] Gdip Bitmap Maker

07 Jun 2019, 09:32

If you say so, I believe you it's not nerdy as well ^_^

However, congratulations on the project. It is truly remarkable!

Keep it up!

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Hellbent
Posts: 1058
Joined: 23 Sep 2017, 13:34

Re: [Editor] Gdip Bitmap Maker

19 Jun 2019, 00:59

Example of using v0.1.7 to create a simple custom Switch (Checkbox) and then coding it into a class for easy use in a gui.

***Warning*** Features Cheesy Copyright Free Music

User avatar
Delta Pythagorean
Posts: 567
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Somewhere in the US

Re: [Editor] Gdip Bitmap Maker

19 Jun 2019, 01:58

@Hellbent
If it's not a bother, could you provide a copy of that recording script you used?

- [AHK].......: 1.1.33.02 Unicode 64-bit
- [OS].........: Windows 10.0.18362
- [GITHUB]...: github.com/DeltaPyth
- [PAYPAL]....: paypal.me/DelPyth
- [DISCORD]..: Delta#3324

Remember to use [code]CODE[/code] for your multi-line scripts.
Stay safe, stay inside, and remember to wash your hands for 20 seconds!
User avatar
Hellbent
Posts: 1058
Joined: 23 Sep 2017, 13:34

Re: [Editor] Gdip Bitmap Maker

19 Jun 2019, 02:10

Delta Pythagorean wrote:
19 Jun 2019, 01:58
If it's not a bother, could you provide a copy of that recording script you used?
It is still in early development, just cramming in new things as I have been going along so there is no order to the ui yet, and there is still a number of features that need to get coded in.


If you use the "Use Ram" option, make sure that you do some testing to see where your limits are and that it is recording everything that you expect.

There are currently 3 hotkeys for testing.
^Numpad3:: Start recording
^Numpad4:: Stop recording
^Numpad5:: Pause recording


***Code Removed***
Last edited by Hellbent on 23 Jun 2019, 12:48, edited 2 times in total.
User avatar
elModo7
Posts: 182
Joined: 01 Sep 2017, 02:38
GitHub: elModo7
Location: Spain
Contact:

Re: [Editor] Gdip Bitmap Maker

19 Jun 2019, 03:18

@Hellbent Wow that recorder looks deffinitely promising! I was using ffmpeg script for that, but this saves using external programs for the task!
:beer:
User avatar
Hellbent
Posts: 1058
Joined: 23 Sep 2017, 13:34

Re: [Editor] Gdip Bitmap Maker

19 Jun 2019, 03:25

elModo7 wrote:
19 Jun 2019, 03:18
@Hellbent Wow that recorder looks deffinitely promising! I was using ffmpeg script for that, but this saves using external programs for the task!
For me the recorder is a must.

OBS (or any other recording software I've tried) often has a hard time on my computer just recording the scite editor let alone games or any number of other things. Plus this gives me lossless quality (Mind you, the video editor drops the quality a bit, but at least I start with pixel perfect image sequences).
I have been using a older version for about a year now and am upgrading it with some new features and making changes to things that I didn't really care for about the original.
User avatar
elModo7
Posts: 182
Joined: 01 Sep 2017, 02:38
GitHub: elModo7
Location: Spain
Contact:

Re: [Editor] Gdip Bitmap Maker

19 Jun 2019, 04:58

OBS unless you have hardware acceleration (QuickSync, Nvenc...) can tax the CPU heavily depending on the model.
I used to record with Mirillis Action, it records raw uncompressed footage (low cpu usage) and then you can export the videos (compress them) after you have finished the recording.
:beer:
User avatar
Hellbent
Posts: 1058
Joined: 23 Sep 2017, 13:34

Re: [Editor] Gdip Bitmap Maker

19 Jun 2019, 15:04

@elModo7

Thanks. I checked out Mirillis Action and it does seem to be an improvement.
User avatar
Delta Pythagorean
Posts: 567
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Somewhere in the US

Re: [Editor] Gdip Bitmap Maker

20 Jun 2019, 15:51

The recorder is probably the most reliable recorder I've seen. Most other recorders just kind of slow my computer down as you have said above, but most of the time they don't even capture. I have a feeling it's because I use an old windows 8.1 computer with a i3 intel processor (I think, I'd have to check, stickers are easily ripped off sometimes).

- [AHK].......: 1.1.33.02 Unicode 64-bit
- [OS].........: Windows 10.0.18362
- [GITHUB]...: github.com/DeltaPyth
- [PAYPAL]....: paypal.me/DelPyth
- [DISCORD]..: Delta#3324

Remember to use [code]CODE[/code] for your multi-line scripts.
Stay safe, stay inside, and remember to wash your hands for 20 seconds!
User avatar
hasantr
Posts: 532
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: [Editor] Gdip Bitmap Maker

10 Jul 2019, 03:35

These are great things. Thanks for sharing with us. Where's your editor? Why can't I find a connection.
robodesign
Posts: 677
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Editor] Gdip Bitmap Maker

10 Jul 2019, 09:14

@Hellbent

Pardon me for barging in again here, but perhaps you already saw my GDI+ based image viewer [ Quick Picto Viewer ]. I have a question for you , if you do not mind... Do you know how to retrieve the histogram of a pBitmap?

https://docs.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nf-gdiplusheaders-bitmap-gethistogram

I chalked-up something of my own using GetPixel from the AHK GDI+ library, however it is slow ...

Thank you .

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
swagfag
Posts: 3974
Joined: 11 Jan 2017, 17:59

Re: [Editor] Gdip Bitmap Maker

10 Jul 2019, 10:33

Code: Select all

HistogramFormat := {ARGB: 0, PARGB: 1, RGB: 2, Gray: 3, B: 4, G: 5, R: 6, A: 7}
DllCall("gdiplus.dll\GdipBitmapGetHistogramSize", "UInt", HistogramFormat.RGB, "UInt*", numEntries)
MsgBox % "Bins total: " numEntries

sizeofUInt := 4
VarSetCapacity(ch0, numEntries * sizeofUInt)
VarSetCapacity(ch1, numEntries * sizeofUInt)
VarSetCapacity(ch2, numEntries * sizeofUInt)
DllCall("gdiplus.dll\GdipBitmapGetHistogram", "Ptr", myBitmap, "UInt", HistogramFormat.RGB, "UInt", numEntries, "Ptr", &ch0, "Ptr", &ch1, "Ptr", &ch2, "Ptr", 0)

Loop % numEntries
{
	i := A_Index - 1
	r := NumGet(&ch0+0, i * sizeofUInt, "UInt")
	g := NumGet(&ch1+0, i * sizeofUInt, "UInt")
	b := NumGet(&ch2+0, i * sizeofUInt, "UInt")

	MsgBox % Format("
	(LTrim
		Intensity: {}
		R: {} pixels
		G: {} pixels
		B: {} pixels
	)", i, r, g, b)
}
where myBitmap is a gdi+ bitmap u got from somewhere
robodesign
Posts: 677
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Editor] Gdip Bitmap Maker

10 Jul 2019, 14:12

Thank you very much , @swagfag !!!

I managed to implement it into my script. I will post the new version tomorrow .

Please note, if I change the Histogram format, it seems to not yield proper values. I tried with Gray [3]... and ... R [ch0] yields immense numbers.

Despite that, I chose to feed it an already gray image, such that it works for me . However, this is not the proper way to do it...

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
swagfag
Posts: 3974
Joined: 11 Jan 2017, 17:59

Re: [Editor] Gdip Bitmap Maker

10 Jul 2019, 15:26

this is how u call it for gray
DllCall("gdiplus.dll\GdipBitmapGetHistogram", "Ptr", myBitmap, "UInt", HistogramFormat.Gray, "UInt", numEntries, "Ptr", &ch0, "Ptr", 0, "Ptr", 0, "Ptr", 0)
Specifies that each pixel is converted to a grayscale value in the range 0 through 255, and then one histogram, based on those grayscale value, is returned. The bitmap is not permanently altered by the conversion to grayscale values; those values are calculated only for the purpose of creating the histogram. The grayscale histogram is written to the buffer pointed to by the channel0 parameter of the Bitmap::GetHistogram method. The channel1, channel2, and channel3 parameters must be set to NULL.
if u didnt do it like this, ur arrays contain garbage values
robodesign
Posts: 677
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Editor] Gdip Bitmap Maker

10 Jul 2019, 16:02

Oh... My bad... Yes, you are correct. Thanks again.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
ananthuthilakan
Posts: 31
Joined: 08 Jul 2019, 05:37

Re: [Editor] Gdip Bitmap Maker

06 Aug 2019, 03:02

hello ,
hellbent ... this is an incredible tool
thanks to the effort u put in to create this

i downloaded the hb bitmap maker 0.1.7 but it seemed so small and some of the buttons and other stuff are misaligned on 1080p resolution
So took sometime to go through your codes (its really impressive) and adjusted the alignments to work with 1080p resolution

now working like charm

thankyou

Return to “Scripts and Functions”

Who is online

Users browsing this forum: leosouza85, w0z, Xtra and 17 guests