Author Topic: Handling bitmaps  (Read 13111 times)

Vortex

  • Member
  • *****
  • Posts: 2768
Re: Handling bitmaps
« Reply #15 on: May 30, 2018, 05:01:44 AM »
Sorry felipe. My apologies. I could not understand the image you posted. What are those symbols? Everything is fine. Sorry again.

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #16 on: May 30, 2018, 05:55:06 AM »
Thanks for the feedback.....
New upload at the top.

You're the man,  Vortex.    :t. Thank you very much, your correction is exactly what I had in mind.

I'll check it out.  when I get home
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #17 on: May 30, 2018, 07:26:22 AM »
Quote from: zedd151

I'll check it out.  when I get home

yup, it works very well now.   :bgrin:

attached jpg reduced in size 50%. The full bmp is perfect in every respect.
« Last Edit: July 19, 2018, 04:14:47 PM by zedd151 »
Regards, zedd.
:tongue:

felipe

  • Member
  • *****
  • Posts: 1381
Re: Handling bitmaps
« Reply #18 on: May 30, 2018, 10:32:20 AM »
Oh i see Vortex, it's just i didn't wanted to show my desktop (is a mess, you don't want to see it  :redface:), so i did a snapshot of a stupid program that i did before (not trying to promete it, really... :idea:). Yes this app is real fantastic, it not only make snapshots of the desktop, it can do snapshots of running apps (as zedd151 show us too)!  :greenclp:

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #19 on: May 30, 2018, 01:05:57 PM »
.... Yes this app is real fantastic, it not only make snapshots of the desktop, it can do snapshots of running apps...

Yes, it is perfect now.  H e knew exactly the fixes I was talking about.   :t


Quote from: felipe
of a stupid program that i did

Nothing is stupid if you gained experience from it. And besides it was one of the catalysts for hutch opening the Game Development forum
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #20 on: July 01, 2018, 10:42:36 PM »
@ Vortex.
 
I made an sfx (self-extracting) executable for your screen capture tool. Now a shortcut for it can be placed on the taskbar. (That is how I use it)
 
The sfx executable contains your original program and a batch file to run it. The resulting .bmp is placed on the %userprofile%\Desktop.
 
 To use:
 
Click on the 'VortexScrCap.exe' file and it unzips in your Temp folder, runs the batch file which in turn runs your program to make a screen capture. After the screen capture is done, it automatically deletes the files from the Temp folder. - and places the resulting .bmp on the current users Desktop.   8)
 
And thans again, this is a very handy tool.
« Last Edit: July 19, 2018, 04:37:10 PM by zedd151 »
Regards, zedd.
:tongue:

Vortex

  • Member
  • *****
  • Posts: 2768
Re: Handling bitmaps
« Reply #21 on: July 01, 2018, 10:53:41 PM »
Hi zedd,

Thanks but the tool didn't save the captured image in my system. Could I propose some small modifications?

Code: [Select]
SaveDesktop.exe "%USERPROFILE%\desktop\capture.bmp"
The double quotes should solve the problems in Windows XP. For example :

Code: [Select]
C:\Documents and Settings\Administrator\Desktop

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #22 on: July 01, 2018, 10:59:09 PM »
Quote
C:\Documents and Settings\Administrator\Desktop

What OS are you runnin? xp?
 
I only Have Windows 7 and WIndows 10 here. I made the sfx so I could have an easy shortcut on my taskbar. I have no way of testing it on older systems
 
I could post another with the double quotes lemme see...
 
Okay here it is, try this one...
« Last Edit: July 19, 2018, 04:36:44 PM by zedd151 »
Regards, zedd.
:tongue:

Vortex

  • Member
  • *****
  • Posts: 2768
Re: Handling bitmaps
« Reply #23 on: July 01, 2018, 11:01:59 PM »
Hi zedd,

Yes, my operating system is XP but no worries. I can try your SFX archive on Windows 7. Here is another version of my application rebuilt as Windows GUI application. No any annoying console window.

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #24 on: July 01, 2018, 11:09:29 PM »
Doesn't work for me. Windows 7 Ultimate SP1   :(
 
I even tried running it from a batch file as in the previous version...
 
Nope, I take that back it runs from the batch file as the previous. I overlooked specifying the output file name.  ::)
 
No GUI though. Did you post the right version? I'm looking at your source code right now...
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #25 on: July 01, 2018, 11:14:34 PM »
Must be a mistake on your part...
 
Code: [Select]
    lea     rsi,buffer
    invoke  ParseCmdLine,rsi
    cmp     rax,2
    jnb     @f
    invoke  StdOut,ADDR message  <--- not Window GUI.
    ret

 :(
Regards, zedd.
:tongue:

Vortex

  • Member
  • *****
  • Posts: 2768
Re: Handling bitmaps
« Reply #26 on: July 01, 2018, 11:17:13 PM »
Here is how I am testing :

Code: [Select]
H:\coding\savedesktop\savedesktop.exe H:\coding\savedesktop\desktop.bmp
The application is built as GUI but it has no any graphical interface like a dialog box. An easy trick :

Changed from :

Code: [Select]
\masm32\bin\polink /SUBSYSTEM:CONSOLE /LARGEADDRESSAWARE /ENTRY:start SaveDesktop.obj ParseCmdLine.obj
to

Code: [Select]
\masm32\bin\polink /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE /ENTRY:start SaveDesktop.obj ParseCmdLine.obj
This method avoids the flashing console screen.


Vortex

  • Member
  • *****
  • Posts: 2768
Re: Handling bitmaps
« Reply #27 on: July 01, 2018, 11:19:04 PM »
Hi zedd,

Code: [Select]
invoke  StdOut,ADDR message  <--- not Window GUI.
You can omit that line. It has no any meaning for the version without console.

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #28 on: July 01, 2018, 11:28:51 PM »
Duh! WHen you said GUI, I was expecting a window.   :redface:
 
So it is still a console 'type' program that still needs the CommandLine arg...  Now I got it. I know I didn't see CreateWindow anywhere,
I thouhgt you posted the wrong version inadvertantly. You just removed the console window from the mix.
 
So then it works as advertised.   :t
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1937
Re: Handling bitmaps
« Reply #29 on: July 01, 2018, 11:43:38 PM »
I just tried using the new version in an sfx archive. It captures not the command window from your program but now the command window from the batch file.  :(   I think I like the 'b' version better.
« Last Edit: July 19, 2018, 04:14:18 PM by zedd151 »
Regards, zedd.
:tongue: