Skip to content

Commit

Permalink
add solution for pictures not resizing properly
Browse files Browse the repository at this point in the history
  • Loading branch information
imak101 committed Jul 1, 2021
1 parent 5a8e1a7 commit 2f6682d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions PaintManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ private Bitmap ResizeImage(Image image, int width, int height)
{
var destRect = new Rectangle(0, 0, width, height);
var destImage = new Bitmap(width, height);

destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);

destImage.SetResolution(image.HorizontalResolution >= 72? 95 : image.HorizontalResolution, image.VerticalResolution >= 72? 95 : image.VerticalResolution);
//destImage.SetResolution(image.HorizontalResolution,image.VerticalResolution); TODO: Remove if above solution suffices

using (var graphics = Graphics.FromImage(destImage))
{
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.1")]
[assembly: AssemblyFileVersion("0.1.1")]
[assembly: AssemblyVersion("0.1.2")]
[assembly: AssemblyFileVersion("0.1.2")]
2 changes: 1 addition & 1 deletion Something.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public PluginInfo Initialise(IntPtr apiInterfacePtr)
_about.Type = PluginType.General;
_about.VersionMajor = 0; // your plugin version
_about.VersionMinor = 1;
_about.Revision = 1;
_about.Revision = 2;
_about.MinInterfaceVersion = MinInterfaceVersion;
_about.MinApiRevision = MinApiRevision;
_about.ReceiveNotifications = (ReceiveNotificationFlags.PlayerEvents | ReceiveNotificationFlags.TagEvents);
Expand Down

0 comments on commit 2f6682d

Please sign in to comment.