coda
Junior Member
Posts: 74
|
Post by coda on Apr 4, 2022 3:06:02 GMT -5
Does anyone know and can recommend any free .dll files for bmp manipulation in-program. Brightness/contrast and colour settings are the types of things I am looking for, in particular. I'm not writing an art program... I think there are enough of those that work far better than one I wrote ever could. I am attempting to make my program useable for those members of the community (such as my brother-in-law) who are affected by the various forms of colour-blindness and who are often overlooked by programmers. I have colour-blindness simulators and I know how to choose colour schemes appropriately for those with various types of atypical vision when, for example, printing text etc. to a graphicbox/window but I also need to adjust some bitmaps on the fly. I know I could load various pre-prepared versions of those bmps made in an art package but it seems more efficient and better if the program can adjust on the fly, that way I can make tests and get feedback from the colour-blind community and make changes more quickly and easily and also the distribution size will also be smaller. Any suggestions warmly welcomed.
|
|
|
Post by tenochtitlanuk on Apr 4, 2022 4:18:19 GMT -5
I've used ImageMagick calls to do all sorts of image-processing. It can do alnost any processing you might need and has more functions than most 'art packages'. Search my site for 'Magick'.
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Apr 4, 2022 4:49:50 GMT -5
Thanyou!
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Apr 4, 2022 5:00:39 GMT -5
I think I have found the documentation ( link) but I cannot find the .dll file, itself, anywhere...
|
|
|
Post by tenochtitlanuk on Apr 4, 2022 5:23:54 GMT -5
I call the .exe file, not the dll.
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Apr 4, 2022 6:05:22 GMT -5
Before I try to follow up on this further, just to be super clear, I don't want to provide art capabilities to my user, I want, as the programmer to be able to load bmp images into graphicboxes and have them appear to have altered colours and altered brightness/contrast than they would if I just loaded them and displayed them because I, as the programmer, called something that remains invisible to the end user to alter them as I display them. Is this what I can do with this?
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Apr 4, 2022 6:24:04 GMT -5
Actually, I've found this at Alyce's Restarurant. image323. It seems a tad slow but it might work for my purposes.
|
|
|
Post by Walt Decker on Apr 4, 2022 9:50:55 GMT -5
From your description I assume that the images will be small, probably not more than 64x64. For images of that size you can do it all rapidly with a few API calls. I will work up a group of modules that will likely do the trick.
|
|
|
Post by Walt Decker on Apr 4, 2022 10:58:08 GMT -5
Since you are dealing with color blindness, would simply inverting the colors in the bitmap suffice?
EDIT: Better yet why not use monochrome bitmaps. If you wanted to change them for some reason you could just invert the colors with one API call.
|
|
|
Post by tenochtitlanuk on Apr 4, 2022 13:51:00 GMT -5
Was going to suggest image323. The ImageMagick method is easy and works fast, and has many more possibilities, but does require you and users to install I.M. Example below resized an image to fit 400x400; inverted the original colours amd loaded unscaled; and unscaled, as B&W Only snag for me is I can't get it reliably working on LB/Wine/Linux, so have to go to a Windoze machine... PS the dog looks lovely whatever I do. My son, also...
|
|
|
Post by Walt Decker on Apr 4, 2022 18:13:01 GMT -5
Simple color inversion. Click a graphic box to show initial bitmap. Click it again to invert. Click it again to show original bitmap. The zip contains two .bmp files and the source code.
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Apr 5, 2022 2:03:21 GMT -5
Thanks, Walt. No the images are large-ish. 339 x 639.
Thanks for the colour inversion zip. Appreciated, although this isn't quite the right tool for this job, it may come in handy.
Ok, I assumed that might be the case. I was looking for something that could work invisibly and be distributed with the package.
I actually got the image323.ddl up and working but the delay is too long for my purposes as this would slow program use for colour-blind people to a snail's pace as my program requires a graphicbox redraw on certain common button pushes.
I have thus decided that my previous assumption that in-program image manipulation was a good idea is NOT the way forward and loading pre-manipulated bmps is the way to go for reasons of speed.
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Apr 5, 2022 9:28:46 GMT -5
Oh I can't get ANYTHING to work under Wine on Linux... I must be doing something horribly wrong... but I guess this isn't the forum for that. Lovely photos, tenochtitlanuk.
|
|
|
Post by Walt Decker on Apr 5, 2022 9:49:11 GMT -5
I understand that color inversion may not be the tool of choice although it will work on graphics of any size.
I know nothing about color-blindness. Does the color blind person see in shades of gray?
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Apr 5, 2022 11:22:13 GMT -5
No, not necessarily. There are many types of colour blindness. There are two types of red/green colour-blindness (deuteranopia and protanopia). These people see the world in shades of blues and yellows. There is a subtle but not so noticeable difference between how these two types perceive the world. My brother-in-law has the most common type of red/green as does my cousin. Then there is another type that is very rare but my mother's former partner had it, it's blue/yellow colour-blindness (tritanopia). These people see the world in more or less greens and pinks. There are also people who suffer from total colour-blindness (achromatopsia). These people see in greyscale as you imagined but often also have other vision problems too. This is VERY rare.
|
|