GithubHelp home page GithubHelp logo

koszeggy / kgysoft.drawing.tools Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 3.0 2.13 MB

Debugger visualizers and image editor apps built on KGy SOFT Drawing Libraries

Home Page: https://kgysoft.net/drawing

License: Other

C# 99.97% Batchfile 0.03%
c-sharp debugger-visualizer kgysoft demo-app quantizing dithering icons image-processing pixel-formats quantization

kgysoft.drawing.tools's People

Contributors

koszeggy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kgysoft.drawing.tools's Issues

Couldnt get working on VS22

In this small test sample:

    ULONG_PTR gdiplusToken;
    GdiplusStartupInput gdiplusStartupInput;
    GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
    int width, height = 200;
    Bitmap bitmap(width, height, PixelFormat32bppARGB);
    Graphics graphics(&bitmap);

    SolidBrush brush(Color(255, 255, 0, 0));
    graphics.FillRectangle(&brush, 0, 0, width, height);

    CLSID pngClsid;
    GetEncoderClsid(L"image/png", &pngClsid);
    bitmap.Save(L"test.png", &pngClsid, NULL);

When i hover bitmap or graphics i'm not seeing the magnifier icon, neither in the debugger watch window.
image

Also, is it possible to preview HBITMAPs?

I'm using VS22 17.6.5
I have installed the extension from the market place.
I also checked KGySoft.Drawing.ImagingTools.exe at Documents
image

Graphics causes an exception on .NET 5

When I try to visualize a Graphics, an exception occurs:

exception visualizing Graphics

No problem when visualizing the Bitmap.

My code :

		using (Bitmap b = new(@"c:\temp\Image 01_C - 24 bits.png"))
		{
			using (Graphics g = Graphics.FromImage(b))
			{
				g.DrawEllipse(Pens.Green, 10, 20, 100, 200);
				g.DrawString("hello", SystemFonts.DefaultFont, Brushes.Red, default(PointF));
			}
		}

The breakpoint is juste after g.Drawing so Graphics is not disposed.

VS : Version 16.11.4

Application : Windows Forms on .NET 5, 32 and 64 bits, Debug.
dotnet --version : 5.0.401

Windows Update : up-to-date

No problem with a Windows Forms application on .NET Framework 4.8, 32 and 64 bits, Debug.

The stack:

     at KGySoft.Throw.InvalidOperationException(String message)
     at KGySoft.Reflection.Accessors.GetPropertyValue(Object instance, String propertyName)
     at KGySoft.Reflection.Accessors.IsSzArray(Type type)
     at KGySoft.CoreLibraries.TypeExtensions.IsZeroBasedArray(Type type)
     at KGySoft.Serialization.Binary.BinarySerializationFormatter.SerializationManager.WriteTypeNamesAndRanks(BinaryWriter bw, Type type, DataTypesEnumerator enumerator, Boolean allowOpenTypes)
     at KGySoft.Serialization.Binary.BinarySerializationFormatter.SerializationManager.WriteRootCollection(BinaryWriter bw, Object data, DataTypes dataType)
     at KGySoft.Serialization.Binary.BinarySerializationFormatter.SerializationManager.WriteRoot(BinaryWriter bw, Object obj)
     at KGySoft.Serialization.Binary.BinarySerializationFormatter.SerializeByWriter(BinaryWriter writer, Object data)
       at KGySoft.Serialization.Binary.BinarySerializer.SerializeByWriter(BinaryWriter writer, Object data, BinarySerializationOptions options)
       at KGySoft.Drawing.DebuggerVisualizers.Serialization.GraphicsSerializationInfo.Write(BinaryWriter bw)
       at KGySoft.Drawing.DebuggerVisualizers.Serialization.SerializationHelper.SerializeGraphicsInfo(Graphics g, Stream outgoingData)
     at KGySoft.Drawing.DebuggerVisualizers.Serialization.GraphicsSerializer.GetData(Object target, Stream outgoingData)
     at Microsoft.VisualStudio.DebuggerVisualizers.DebuggeeSide.Impl.ClrCustomVisualizerDebuggeeHost.GetData(Object visualizedObject)

The image:
Image 01_C - 24 bits

The extension makes Visual Studio unstable

  1. When I visualize a Bitmap then close a Windows Forms app several times, the Visual Studio UI enters in troubles.

For example it can be blank after the application is closed:
blank VS

  1. After the previous problem, if I try to run again the application (F5), VS loops indefinitely:
    VS looping

Apparently, VS cannot read Program.cs again.
I can't even cancel that. I have to kill VS process.

No more problems after having uninstalled the extension.

VS : Version 16.11.4

Application : Windows Forms on .NET 5
dotnet --version : 5.0.401

Windows Update : up-to-date

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.