alternetsoft / AlternetUI

MIT License
22 stars 2 forks source link

Bitmap.Clone Enhancement #96

Closed neoxeo closed 4 months ago

neoxeo commented 6 months ago

@generalloki

Could you add Bitmap.Clone(Rectangle, PixelFormat) (https://learn.microsoft.com/en-us/dotnet/api/system.drawing.bitmap.clone?view=windowsdesktop-8.0#system-drawing-bitmap-clone(system-drawing-rectangle-system-drawing-imaging-pixelformat)

Thanks

generalloki commented 6 months ago

This method with PixelFormat parameter looks complex to implement as we need to map it to wxWidgets call. For what reason are you going to use it? What is the task?

neoxeo commented 5 months ago

@generalloki

Here is the application I try to convert to AlternetUI : https://github.com/tgraupmann/WinForm_Ollama_Copilot

Here is the code used for OCR and it use "CopyFromScreen" and "Bitmap.Clone" : https://github.com/tgraupmann/WinForm_Ollama_Copilot/blob/master/OcrManager.cs

And here you can see how it works : https://www.youtube.com/watch?v=WHM-Bc9k04E

generalloki commented 5 months ago

I would ask in other words: What PixelFormat values you would use? I don't see using of Bitmap.Clone there