Hmm... well it appears that either you don't understand colorspaces and how color values work, or you didn't realize that I am trying to display the picture while working on it (which to me is a given). Doing what you suggest will not produce a grayscale picture as assigning a pixel in ARGB format the value of 65535 will give the G (green) channel a value of 255 and a blue channel value of 255 (making yellow) and an ARGB pixel value of 255 will give solid blue.
Furthermore, when .NET reads a 16bit grayscale picture, it DOES use the ARGB (specifically the 32bbpARGB) format and it DOES loose the data because it truncates the 16 bit value to an 8 bit value, losing the less significant bits (so 65535 is read as 255 and 255 is read as zero). You can find documentation about this issue all over the internet. It has the same effect as dividing the 16 bit values by 256. It then fills each of the color channels (RGB) with this 8 bit value so that they are all the same, giving a grayscale picture. Otherwise, you would not see a grayscale picture. If you then try to save the file, it will result in an 8bit grayscale picture. If you try using the 16bbpGrayscale pixel format and then try to save it, .NET throws an exception because 16 bit grayscale picture loading and saving are not supported by .NET (hence the need for this thread).
Hmm... well it appears that either you don't understand colorspaces and how color values work, or you didn't realize that I am trying to display the picture while working on it (which to me is a given).
Not much experience with manipulating the colormap, just curious
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
Thanks. I hadn't heard of SkiaSharp. I will look into them. I mentioned my problem with Magick.NET in the OP but it turns out that the link for the runtime is just hard to find. Apparently I don't have to compile Magick.NET myself (which I was unable to do because their format is for VS 2017... they don't have any downloads for earlier versions of VS).
As is, I have a working solution since I found the Magick.NET dll and while inefficient, I have a work-around. To clarify, I will probably still look into SkiaSharp for this, or future reference, as Magick.NET doesn't appear to have an efficient way of modifying pixel values directly.
I created a numeric up down control that can be placed in a toolstrip using the ToolStripControlHost. Now I want to be able to use it in designer. This article explains why it can't be done strictly using the ToolStripControlHost but it doesn't explain how to make it Designer compatible... at least not explicitly.
The problem is that I am already inheriting from ToolStripControlHost. As far as I know, c# does not allow inheriting from more than one class. So how do I make my ToolStripControlHost control Designer compatible? I have researched and found that there is a DocumentDesigner class that I could subclass and reference. However, I don't want this control to be added to the Toolbox. I only want it to show up on the ToolstripItem designer interface, so I am allowed to add it as shown in the example in the linked article (The "Month Calendar" in the dropdown for adding another control to the toolstrip). How would I do this?
I have created a process that's runing a thread that open some windows form, now i want that other
running threads from the same process will be able to pass data to this windows form or even close it or reopen it.
The Windows form GUI is always in use of the end users so i cant lock.
what is the best way to implement it in c# ? i would like a short example, thanks.
I need to get the list of all the processes running in a Windows Embedded Compact 7 operating system.
My application is written in C# (Visual Studio 2008).
The problem is that the function System.Diagnostics.Process.GetProcesses() is not present in .NET Compact Framework and I don't know how to get the processes list.
Someone has some ideas on how to solve the problem?
The later is much easier on the memory management, but might require more copy (of 65 bytes) struct. I wonder which one would be best.
How would I figure out the best option?
The (possible) memory management issues of the first choice might only be apparent when lots of Point2D array are saved in generation 2 memory pool and then destroyed...
Hi. I have a special software which only accept pointgray or ids camera.
They are industrial cameras and are very expensive.
industrial cameras are the same as webcam but with enhanced functionality.
Is it possible to write an application which can create a virtual industrial camera, and get photos from a webcam and feed it to that software? the only problem is that software does not accept any other cams except than IDS and pointgray.
In vb.net I can create an application to capture from a webcam using aforge.NET. But i need help to create a simulatir. I searched both ptgray and IDS websites for if there is any kind of simulator, but not found.
Can you guide me how to start to create a simulator?
Please don't repost if your message does not appear immediately: both of these went to moderation and required a human being to review them for publication. In order to prevent you being kicked off as a spammer, both had to be accepted, and then I have to clean up the spare. Have a little patience, please!
I've deleted the spare version.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
Last Visit: 31-Dec-99 18:00 Last Update: 13-Jun-21 23:54