The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => Miscellaneous Projects => Windows Projects => Topic started by: Ewayne on March 08, 2005, 10:21:26 PM

Title: Image Editor Test (03-08-2005)
Post by: Ewayne on March 08, 2005, 10:21:26 PM
Hi All,

I wanted an Icon/Cursor create/edit program that would be able
to load multiple file types, handle 24 bit color depth and
24 bit color depth with the alpha channel.

The two trial programs that I found that would do the job
were exspensive and had about 37 popup windows (I don't like
a lot of popup windows) and they were large in size, one
was 6.5 meg and the other was 2.5 meg.

So I thought I would write a convert program to convert
Icons and Cursors to a Bitmap and then convert the Bitmap
back to an Icon or Cursor.

I thought I could use my Photo Shop or Paint Shop to edit
the Bitmap, but my release of photo Shop does not like 32 bit
and my Paint Shop converts 32 bit to 24 bit.

After not being satisfied with the above, I decided to write my own.
It will load most formats (iPicture) and you can save the image
as a Bitmap, Icon, or Cursor in sizes 16x16 thru 48x48 and a dual
16x16/32x32 size with color depths including 24 bit with 8 bit alpha
channel.

So far it is nothing fancy, it has the normal flip flop, zoom and
the only edit tools that it has are the pencil, line, and bucket.
It has a rectangle selection with (marching ants), the lasso selection
draws, but you can not do anything with it, I'm still working on that.

You can have up to 16 undo's/redo's, and you can also test Cursors
and set their hot spots.

Let me know if it works.

04-10-2005  Made several changes.
Prior downloads (69)

Thanks,

Ewayne


[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 09, 2005, 07:34:39 AM
By a first look,it seems good,except for the labels on the left and right of main window.
Labels size and distance is very small and the letters cut or overlay in my screen,(1024x728).
You must increase the size and distance.

Manos.
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 09, 2005, 01:15:21 PM
Hi Manos,

Thanks for the replay.

The fonts display ok on my systems (1024x728), but I increased the area
for the fonts for folks that might be having a problem.

You can go to the first post of this thread for the update.

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 09, 2005, 03:00:03 PM
The problem exists yet.
You have to increase the distance between combos,edits and labels.
Also,it is preferable to delete the cross in front of pencil.

Manos.
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 09, 2005, 04:24:21 PM
Hi Manos,

Could you post a screen shot, because like I said it's ok on my systems
and I had three other people check it and they said it was ok also.

I like the cross, I will probably have an option for the user to pick their
own tools.

Thanks,

Ewayne


Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 09, 2005, 06:05:27 PM
OK Ewayne.

I send you the left and right sides.

Manos.


[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: raymond on March 09, 2005, 06:38:10 PM
Ewayne

Dialog boxes have one major problem stemming from the fact that their size varies depending on the font size set by the user. I have had such a problem with one of my programs. :eek

To see the effect of this on your program, change the font size on your system from normal to large (and even to extra large). At high screen resolutions, many people have to use those larger font sizes in order to be able to read text on their screen.

If you do notice problems due to changing font size, the only recourse may be to design dialog boxes to fit each font size and select the proper one for display after verifying which font size is being used. The size and location of everything else in your window must also be adjusted accordingly. You may have a lot of fun with this. :boohoo:

Raymond
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 09, 2005, 07:15:57 PM
Hi raymond,

I have changed my font size to large  and extra large and it still looks ok on my XP system.

I will try changing the DPI on my Win98 and NT.

Thanks,

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 09, 2005, 07:24:21 PM
Hi Manos,

I just had a look at your screen shots and WOW it does look bad  :tdown.

What is your dpi setting?

Thanks,

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 09, 2005, 08:00:01 PM
I use 1024x728,screen 17" and I have change the font size on my system from normal to large,(125%).

Manos.
Title: Re: Image Editor Test (03-08-2005)
Post by: QvasiModo on March 09, 2005, 09:20:45 PM
Simply using actual dialog boxes (instead of controls created with CreateWindowEx) should solve the problem. But it might look better if you keep a couple different image sets for your buttons, to be used with different font sizes (so you won't have a large button with a tiny image inside it).

Hope that helps! :)
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 10, 2005, 03:34:10 AM
Hi,

I'm a little confused, I've written hundreds of programs and this is the first time I've had
problems of this magnitude.

I set the fonts on every control on the main window (not the two small dialog boxes) so
it should not matter if you change the system font to large or extra large and or change
the screen size to 800x600.

On my systems I changed the system font size to large (and extra large on the XP system)
and the font size for the controls did not change (The font size in the title bar, menu, and status bar changed).
Same thing when I change the display to 800x600.

Is it posible that the systems that are having the problem are not recognizing the font that I'm using, it is a standard
font: (MS Sans Serif)?

I'm going to do a little test I set the y Hot Spot control to a large size, so if that stays the same size as the other
controls then the system is not recognizing the font.

I'm attaching the test program.

P.S. It looks like the other MASM forum has been hacked again!

Thanks,

Ewayne



Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 10, 2005, 03:50:44 AM
Hi,

This is what the control fonts  looks like on my systems no matter what the system font size is set at.

Ewayne




[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 10, 2005, 09:34:15 AM
Have a look in follow attached to see how this  looks like on my system.

Manos.


[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 10, 2005, 06:26:41 PM
Hi Mano,

I don't know why the WM_SETFONT doesn't seem to be working on your system and the other
systems that are not displaying properly.

I've had it tested on several other systems with the DPI changed to 120 and the fonts look ok.

If you have time download the attachment. There is an option on the menu to change the three fonts
that the program uses and let me know what font and size displays ok on your system.

Thanks,

Ewayne

Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 10, 2005, 07:14:22 PM
In follow attachment I use Arial size 5  but the right side does not looks OK.
Combos are not affect.
Download my attachment and you will see.
In my opinion,you have to use Dialog as main window to solve the problem.
Note:
I have WinXP.

Manos.


[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 10, 2005, 08:15:48 PM
Hi Mano,

Did you use Font MD to change the three Combo fonts and some of the other fonts
on the right hand side?

Also could you try "MS Sans Serif" 6 for the Font SM to see how the fonts on the left
hand side look, maybe your system doesn't like "MS Sans Serif".

If the "MS Sans Serif" 6 looks ok then it didn't like changing the fonts during the create routine.
If it is still too large I will use Arial or Tahoma to see if that woks.

I know I could fix it by making it a dialog, but whaterver you can do with a dialog you can
do with CreateWindow plus more.

Thanks,

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: QvasiModo on March 10, 2005, 08:26:07 PM
Quote from: Ewayne on March 10, 2005, 08:15:48 PM
I know I could fix it by making it a dialog, but whaterver you can do with a dialog you can
do with CreateWindow plus more.
I suppose you could measure the size in pixels of your text strings, and create each control with the appropriate size... but it sounds like reinventing the wheel to me. :shrug:
Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 10, 2005, 08:51:58 PM
I changed the font as follow:
SM-->Arial 6
MD-->Arial 6

With these changes,it looks good.
See my attachment.

Manos.


[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 10, 2005, 09:02:20 PM
Hi QvasiModo,

I could figure out how to do it, but I should not have to do that.

It has been tested on 7 different systems from Win98 thru XP pro with
120 dpi and or large fonts with no problem.

There is something strange about some systems like they doesn't like name or the size of some fonts.

Thanks,

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 10, 2005, 09:26:14 PM
Hi,

Well it looks like we're making progres.

Try this attachment I set the SM font to Arial 6 and MD font to Arial 7.

If this works I will check the DPI setting and set the font accordingly, because on my system
the font is so small it's hard to see the text.

Thanks,

Ewayne

Title: Re: Image Editor Test (03-08-2005)
Post by: pbrennick on March 11, 2005, 06:27:52 PM
Ewayne,
I would just like to point out that Manos has had a history of font troubles.  He complained a lot about the font settings of this board, for example.  He has a problem that I never could reproduce though I tried many times.  I suspect it is his Graphics card.

No offense, Manos, but let's be fair to Ewayne, I have known Ewayne for many years and he has always bent over backwards to try to help.  Even when I made stupid mistakes!  :wink

Paul
Title: Re: Image Editor Test (03-08-2005)
Post by: AeroASM on March 11, 2005, 07:41:20 PM
I realise that this project is by no means pointless, but Microsoft has already made a good icon/cursor editor. I tis called ImagEdit.exe and is in \masm32\bin
Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 11, 2005, 08:03:37 PM
Quote from: pbrennick on March 11, 2005, 06:27:52 PM
Ewayne,
I would just like to point out that Manos has had a history of font troubles.  He complained a lot about the font settings of this board, for example.  He has a problem that I never could reproduce though I tried many times.  I suspect it is his Graphics card.

No offense, Manos, but let's be fair to Ewayne, I have known Ewayne for many years and he has always bent over backwards to try to help.  Even when I made stupid mistakes!  :wink

Paul


Paul,
I have no problems with my graphics card(128 MB ASUS).
Also,I complained about the font settings of this board because I don't like this font,simply.
I could no expression properly,because of my little English.
I like the old Forum font.

Ewayne,
your last attachment seems good,except font size that is very small.
In my opinion,it is preferable to increase the size of main window.
Have a look in follow attachment.

Manos.



[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: pbrennick on March 11, 2005, 08:14:15 PM
Manos,
Calm down.  The point I am making is that you have complained about font size before and I could not reproduce it.  That is all and it does bear on this problem because you are making the exact same claims.  There is no need to get angry.  Truth always will find a way to solve a problem and Ewayne needs all the data he can get.  I have tried his program on win98, win98se, winxp, winxp pro and win me and in all cases, it looks very acceptable.  If he makes a change to solve a problem that is very narrow in scope, he runs the risk of causing problems elsewhere.  As an intellectual, you know this is correct.

Peace Manos,
Paul
Title: Re: Image Editor Test (03-08-2005)
Post by: Manos on March 11, 2005, 08:29:39 PM
Paul,

In this case combos and labels are overlaped.

Manos.
Title: Re: Image Editor Test (03-08-2005)
Post by: pbrennick on March 11, 2005, 09:27:54 PM
Manos,
I see, although I do not understand why.  We are all concerned about your problem but I am not sure if you will ever be happy with the result just as you are unhappy with this forum.  There must be some one thing that we are all overlooking that impacts your viewing experience.  I truly hope you get a good result but I fear it may always plague you.  I wish I had an answer for you, my friend.

Paul
Title: Re: Image Editor Test (03-08-2005)
Post by: MichaelW on March 13, 2005, 03:03:50 AM
For the most recent ImgEdit attachment (and using my 54-year-old eyeballs):

Under Windows 2000, 1024x768, 32bpp, large (120dpi) fonts, Matrox G200, and Sony Multiscan E200 (17 inch), the small fonts (labels Alpha value, Size, Depth, and Type) are difficult to impossible to read.

Same for Windows XP, 1024x768, 32bpp, normal (96dpi) fonts, ATI Rage Pro Turbo, and Sony Multiscan E200. Changing to large fonts does not seem to alter the apparent size or the readability (for the small fonts). Enabling ClearType improves the readability somewhat, at the expense of making the small fonts appear fuzzy and out of focus.

Also, with large fonts there seems to be a problem with the horizontal white bar, which is above the status bar with normal fonts, overlapping the status bar.

The attachment shows (I hope) what it looks like on both systems (with large fonts and without ClearType).


[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 14, 2005, 06:33:22 PM
Hi All,

Thanks for the replies.

Sorry about the delay, I had to go out of town for a few days.

I looks liike I missed out on some good conversation.

To AeroASM:
I was not aware of ImagEdit.exe, but after looking at it, it supports the reason that
I'm writting my own. e.g. it only supports 2 or 16 colors, not 24 or 32 bits that I wanted.

But anyway, sometimes I write programs just to see If I can.

To MichaelW:
I hope the changes fix your problems.


Thanks Paul for the support.

About the fonts and the main window size, the program now checks at load time (If the first time)
to see if the DPI is greater then 96 and or the system font is greater then normal. If it is the program
will attempt to adjust the fonts accordingly. If the result is not to your satisfaction you can go to the
Options menu and change the fonts.
NOTE ! The controls use three different size fonts so you will probably have to change all THREE, SM, MD, and LG.

The main window will also resize itself depending on the DPI and system font size.

Some added features:

1. You can select your drawing tools.
2. While drawing the left and right mouse buttons controls the color to use Foreground, Background.
3. The program will save your fonts and your drawing tool selection(s).

You can go to the first post on this thread for the update.

Thanks,

Ewayne





Title: Re: Image Editor Test (03-08-2005)
Post by: pbrennick on March 14, 2005, 10:11:08 PM
Thanks Ewayne,
I am using an ATI RAGE MOBILITY-M1 AGP Adapter set to 1024x768, Normal 96 dpi and I include a screen shot.  The only complaint I have is please put the minimize control on the window.  I run a lot of stuff at the same time and I need to be able to minimize what I am not dealing with at the moment.

Paul


[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 14, 2005, 10:35:24 PM
Hi Paul,

Thats about the way it looks on my three systems.

Just for you I will put the minimize box back on.

Do you find the program useful?

For the folks that need to change the fonts some good choices are:

MS Sans Serif
Tahoma
Arial

Thanks,

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: pbrennick on March 14, 2005, 10:47:25 PM
Ewayne,
Yes I do, it will satisfy a need, in my opinion.  Currently, in order to do some of the things I want to do, I have to resort to PSP.  This is a far better solution.

BTW:  I do not want to start a war of words, but I suspect that some of theproblems that people are having are caused because they have played with their system settings.  At least one person has virtually the same adapter as I have and it does not look good.  See what I mean?  How else can it be explained.

And thank you for the minimize button.  I really appreciate it.
Paul
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 14, 2005, 11:29:25 PM
Hi Paul,

Hopefully for those folks that change their system settings they can still use the program,
if not I will need some additional information.

If you can think of anything you would like added let me know.

After most of the bugs are out you will be able to go to my web site and get the source.

You can go to the first post of this thread for the min update.

Thanks,

Ewayne


Title: Re: Image Editor Test (03-08-2005)
Post by: MichaelW on March 15, 2005, 12:51:19 AM
Thanks Ewayne,

The default small fonts are now easy to read. The only other visual flaw I have noticed is that the Type list clips the "p" on "Bitmap".


Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 15, 2005, 01:11:42 AM
Hi MichaelW,

Try changing the medium font (Font MD) to Tahoma or MS Sans Serif.

Thanks,

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: pbrennick on March 15, 2005, 01:39:14 AM
Ewayne,
This is just a curiousity type question.  What is up with those blank buttons in the tool window?

Paul
Title: Re: Image Editor Test (03-08-2005)
Post by: MichaelW on March 15, 2005, 02:48:15 AM
Setting Font MD to MS Sans Serif made the problem worse, but setting it to Tahoma worked OK.

Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 15, 2005, 02:52:37 AM
Hi Paul,

Well nothing right now, but there might be something for them in the future when I learn
more about graphics.

But then again there is only so much you can do with a maximum of 48x48 pixel canvas.

Ewayne


Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on March 15, 2005, 02:56:27 AM
Hi MichaelW,

I'm glad it worked, you do know that you can set the font smaller then what the size shows in the font dialog.

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: LeXTeRiTY_X on April 10, 2005, 01:24:47 PM
Looks great so far.

The drawing board at the moment scrambles up on this computer. I've attached a screenshot the the end of this message.
If it helps, I'm currently using Windows 98SE.

It will be great to see this project to get ahead! :U

-X

[attachment deleted by admin]
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on April 10, 2005, 03:28:19 PM
Hi Sam,

Strange problem you have there..

Does this happen when you first load the program?
If it does it looks like the memory is not being set for the blank bitmap.

Does it happen when you load an image?

Have you tried changing the canvas size, if so is the problem still there?

Let me know.

You can go to the first post on this thread for an update, I've added shapes and some other things.

Thanks,

Ewayne



Title: Re: Image Editor Test (03-08-2005)
Post by: LeXTeRiTY_X on April 17, 2005, 03:02:39 AM
Hi Ewayne,

Thanks for the update.

The pattern in the canvas concerning Windows98SE only appears when the app first starts or File -> New is used. Once the pattern is there, using the pen or line tool, resizing the canvas or modifying it in any way only changes the canvas to some other pattern.

It does, however, work when a resource is loaded through File -> Open.... After that it works fine (drawing tools work, the canvas can be resized - in all, the canvas then works).

I've tested it in Win2KPro now and it works fine. It looks great. :U

-X
Title: Re: Image Editor Test (03-08-2005)
Post by: Ewayne on April 30, 2005, 12:35:30 AM
Hi HuMaX,

I did not find it that difficult, and I might in the future do a full scale image editor.

I will be postiing the source for the ImgEdit on my web site soon, if that will help.

Thanks,

Ewayne
Title: Re: Image Editor Test (03-08-2005)
Post by: taianmonkey on May 31, 2007, 09:59:52 AM
Ewayne:
     Could you share your source code ?
     thanks a lot!