-
Posts
510 -
Joined
-
Last visited
-
Days Won
3
Posts posted by Zagna
-
-
That's because Inkscape creates something else that paint.net wants.
<?xml version="1.0" encoding="UTF-8"?> <!--This file is NOT compatible with Silverlight--> <Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Stretch="Uniform"> <Canvas Name="svg2" Width="744.09448819" Height="1052.3622047"> <Canvas.RenderTransform> <TranslateTransform X="0" Y="0"/> </Canvas.RenderTransform> <Canvas.Resources/> <!--Unknown tag: sodipodi:namedview--> <!--Unknown tag: metadata--> <Canvas Name="layer1"> <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="path3336" StrokeThickness="1" Stroke="#FF000000" StrokeLineJoin="Miter" StrokeStartLineCap="Flat" StrokeEndLineCap="Flat"> <Path.Data> <PathGeometry Figures="M 356.56508 340.47013 85.62822 148.31242 187.98595 0 -143.12563 143.12563 -219.62981 0 -151.9094 -151.90939 175.43279 0 Z" FillRule="evenodd"/> </Path.Data> </Path> </Canvas> </Canvas> </Viewbox>
That's what Inkscape makes and we want that PathGeometry data. We copy it and put in a file like this
<ps:SimpleGeometryShape xmlns="clr-namespace:PaintDotNet.UI.Media;assembly=PaintDotNet.Framework" xmlns:ps="clr-namespace:PaintDotNet.Shapes;assembly=PaintDotNet.Framework" DisplayName="Weird" Geometry="M 356.56508 340.47013 85.62822 148.31242 187.98595 0 -143.12563 143.12563 -219.62981 0 -151.9094 -151.90939 175.43279 0 Z" />
This can then work in paint.net. Remember to put a DisplayName that you'd like.
BoltBait has more info in How to make custom shapes for paint.net 4.0.6+
- 1
-
-
Decided to run a little stress test with a somewhat complex custom shape from an old svg I made ages ago
952 nodes, single Geometry. Takes several seconds for paint.net to load Shapes tool, additional several seconds to load my shape.
http://personal.inet.fi/palvelu/paintnet/paint/tribal.png But it works
-
Using a mix of Inkscape and one of BoltBait's shapes, was very easy to make a simple test shape. Inkscape supports saving in XAML, then just looked at the file structure in one of the shapes and that's it.
Take the XAML that Inkscape outputs and drop it in Geometry... now to start making stupid and silly shapes.
-
No notification to update - it just auto-updates and fails with an 80240020 or an 80246010 error?
I've tried the recommended eg."wuauclt.exe/updatenow" trick http://answers.microsoft.com/en-us/windows/forum/windows_10-win_upgrade/windows-10-failed-to-install-error-code-80240020/9d69a99b-1851-4464-b10b-e69946993e78?auth=1
Very frustrating, completely dissillusioned with Microsoft. :(
Windows Update Installation Failure 80240020 The answer from a mod there helped my upgrade get started. Just give it a moment after changing the registry because it starts doing some checks before Update shows that the update can be made.
My own plans have been derailed. Apparently my Atom based netbook isn't capable of running Win10 (despite meeting the minimum specs & having the installation icon).
If 8.1 is still working - why not wait a while and see if a fix is posted?
My Atom N270 based netbook is running Windows 10 fine. It's one of the first Atom processors made so if it can, so should others?
-
Since the upgrade, everytime I go to put my computer to sleep.... I instinctively go for the charm bar and do the motion several times because nothing happens.....
Then I go to the start menu and continue to the right menu. How long will I keep doing it.
-
When I force an update, it results in an HTTP 404.
Just simply that there's no update manifests yet (for 10240)?
-
Okay, made a second video, this time with Bandicam instead of Expression Screen Capture, which produces much better quality and much higher framerates.
Ctrl+C from Irfanview, then at 0:21 and 0:24 try Ctrl+V. Save at 0:57 saves the original white image, save after that saves what's on the screen.
Edit: It seems also Ctrl+Alt+V works
-
Here's the error.
Hidden Content:Tämä tekstitiedosto luotiin koska paint.net kaatui. Lähetä tämä tiedosto crashlog4@getpaint.net jotta se voidaan tarkistaa ja korjata ongelma. Application version: paint.net v4.0.5 (Final 4.5.5454.39504) Time of crash: 26.7.2015 7:51:17 Application uptime: 00:22:56.5567802 Application state: Running Working set: 164 604 KiB Threads: 34 Install directory: C:\Program Files\Paint.NET Current directory: C:\Program Files\Paint.NET OS Version: 6.3.9600.0 Workstation x64 .NET version: CLR 4.0.30319.34209 x64, FX 4.0 4.5 Processor: 4x "AMD Athlon(tm) II X4 640 Processor" @ ~3010MHz (DEP, SSE, SSE2, SSE3) Physical memory: 8190 MB Video card: AMD Radeon HD 6800 Series (v:1002, d:6739, r:0), Microsoft Basic Render Driver (v:1414, d:8C, r:0) Hardware acceleration: True (default: True) UI animations: False UI DPI: 96,00 dpi (1,00x scale) UI theme: Aero/Aero + DWM (Aero.msstyles) Updates: True, 22.7.2015 Locale: pdnr.c: fi, hklm: fi, hkcu: fi, cc: fi-FI, cuic: fi Flags: Exception details: System.InvalidOperationException: scratchSurface is currently borrowed: PaintDotNet.Controls.DocumentWorkspace.DoSaveAs() handing off scratch surface to DoSaveAsDialog() kohteessa PaintDotNet.Controls.DocumentWorkspace.OnDocumentChanging(Document newDocument) tiedostossa d:\src\pdn\paintdotnet\src\PaintDotNet\Controls\DocumentWorkspace.cs:rivillä 2073 kohteessa PaintDotNet.Controls.DocumentView.DocumentSetImpl(Document value) tiedostossa d:\src\pdn\paintdotnet\src\PaintDotNet\Controls\DocumentView.cs:rivillä 569 kohteessa PaintDotNet.Actions.PasteAction.PerformActionImpl() tiedostossa d:\src\pdn\paintdotnet\src\PaintDotNet\Actions\PasteAction.cs:rivillä 186 kohteessa PaintDotNet.Actions.PasteAction.PerformAction() tiedostossa d:\src\pdn\paintdotnet\src\PaintDotNet\Actions\PasteAction.cs:rivillä 56 kohteessa System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) kohteessa System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) kohteessa PaintDotNet.Menus.PdnMenuItem.OnShortcutKeyPressed(Keys keys) tiedostossa d:\src\pdn\paintdotnet\src\PaintDotNet\Menus\PdnMenuItem.cs:rivillä 177 kohteessa PaintDotNet.PdnBaseForm.ProcessFormHotKey(Keys keyData) tiedostossa d:\src\pdn\paintdotnet\src\Core\PdnBaseForm.cs:rivillä 998 kohteessa PaintDotNet.PdnBaseForm.ProcessCmdKeyData(Keys keyData) tiedostossa d:\src\pdn\paintdotnet\src\Core\PdnBaseForm.cs:rivillä 1053 kohteessa PaintDotNet.PdnBaseForm.ProcessCmdKey(Message& msg, Keys keyData) tiedostossa d:\src\pdn\paintdotnet\src\Core\PdnBaseForm.cs:rivillä 1036 kohteessa System.Windows.Forms.Control.PreProcessMessage(Message& msg) kohteessa System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg) kohteessa System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg) Managed assemblies: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll PaintDotNet, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.exe PaintDotNet.Core, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Core.dll PaintDotNet.Base, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Base.dll System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll PaintDotNet.SystemLayer, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.SystemLayer.dll PaintDotNet.Framework, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Framework.dll PaintDotNet.Resources, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Resources.dll PaintDotNet.Data, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Data.dll PaintDotNet.Effects, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Effects.dll PaintDotNet.SystemLayer.Native.x64, Version=4.5.5454.39504, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.SystemLayer.Native.x64.dll System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll System.Windows.Forms.resources, Version=4.0.0.0, Culture=fi, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.resources\v4.0_4.0.0.0_fi_b77a5c561934e089\System.Windows.Forms.resources.dll System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll OpenRasterFiletype, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\FileTypes\OpenRasterFiletype.dll WindowsFormsIntegration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsFormsIntegration\v4.0_4.0.0.0__31bf3856ad364e35\WindowsFormsIntegration.dll mscorlib.resources, Version=4.0.0.0, Culture=fi, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_fi_b77a5c561934e089\mscorlib.resources.dll Native modules: C:\Program Files\Paint.NET\PaintDotNet.exe, version=4.5.5454.39504 C:\WINDOWS\SYSTEM32\ntdll.dll, version=6.3.9600.17031 (winblue_gdr.140221-1952) C:\WINDOWS\SYSTEM32\MSCOREE.DLL, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\KERNEL32.dll, version=6.3.9600.17031 (winblue_gdr.140221-1952) C:\WINDOWS\system32\KERNELBASE.dll, version=6.3.9600.17238 (winblue_gdr.140723-2018) C:\Program Files\Bitdefender\Antivirus Free Edition\avc3\avc3_sig_314\avcuf64.dll, version=3.11.11868.5873 C:\WINDOWS\system32\ADVAPI32.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\msvcrt.dll, version=7.0.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\sechost.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\RPCRT4.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\system32\SHLWAPI.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\combase.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\USER32.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\GDI32.dll, version=6.3.9600.17902 (winblue_ltsb.150609-2200) C:\WINDOWS\system32\IMM32.DLL, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\system32\MSCTF.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\SYSTEM32\MSVCR120_CLR0400.dll, version=12.00.51670.34230 built by: FX452RTMGDR C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\mscorlib\fc9860df7e7c03efd26ad5311301dfcb\mscorlib.ni.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\system32\ole32.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\kernel.appcore.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\CRYPTBASE.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\bcryptPrimitives.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\system32\uxtheme.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System\03684c663aa6a9eeb92faf2dfdba9bc2\System.ni.dll, version=4.0.30319.34239 built by: FX452RTMGDR C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Drawing\6e1b958ee34db3390a1933d89d17170e\System.Drawing.ni.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\WindowsBase\9e2dfa72baf09b0bc528d5f9359c18ae\WindowsBase.ni.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\SYSTEM32\CRYPTSP.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\system32\rsaenh.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\bcrypt.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PresentationCore\9dc476c18e41e55731720580ade6eb50\PresentationCore.ni.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\Presentatio5ae0f00f#\21d546627bac8103215dd477745740f7\PresentationFramework.ni.dll, version=4.0.30319.34209 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Core\374fcab45c666ab4e3cb1d8f0b2ff117\System.Core.ni.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNet.Base\6ed0b850f73a77ee52240e32a815237f\PaintDotNet.Base.ni.dll, version=4.5.5454.39504 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Windows.Forms\e0b8a248060305c60b04c92d55612fff\System.Windows.Forms.ni.dll, version=4.0.30319.34250 built by: FX452RTMGDR C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNet500b2e4f#\8d5f50e24021f46332c68e2b797df3eb\PaintDotNet.SystemLayer.ni.dll, version=4.5.5454.39504 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNet.Core\ed4319e3fe2a44927fdd560eb5c792de\PaintDotNet.Core.ni.dll, version=4.5.5454.39504 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNet26779e70#\83643d183286c8a8d5d9b5f74a69edbe\PaintDotNet.Resources.ni.dll, version=4.5.5454.39504 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNet7afaaa15#\097bfe0a7177cf608abdf9204e185c1c\PaintDotNet.Framework.ni.dll, version=4.5.5454.39504 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNet.Data\eeeed6423526f269e7b01eaea7a73f9b\PaintDotNet.Data.ni.dll, version=4.5.5454.39504 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNet.Effects\a8ff9e2aedbe7ace543433bcf3f8573d\PaintDotNet.Effects.ni.dll, version=4.5.5454.39504 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNet\c15e3d83816f4ceb699c5e525ce40722\PaintDotNet.ni.exe, version=4.5.5454.39504 C:\WINDOWS\SYSTEM32\dwrite.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\wpfgfx_v0400.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\system32\OLEAUT32.dll, version=6.3.9600.17560 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\PresentationNative_v0400.dll, version=4.0.30319.33440 built by: FX45W81RTMREL C:\WINDOWS\system32\shell32.dll, version=6.3.9600.17031 (winblue_gdr.140221-1952) C:\WINDOWS\SYSTEM32\SHCORE.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\version.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\PaintDotNetc8826574#\10375de5bc55a27a11407a26f6c0a2a1\PaintDotNet.SystemLayer.Native.x64.ni.dll, version=4.5.5454.39504 C:\Program Files\Paint.NET\PaintDotNet.SystemLayer.Native.x64.dll, version=4.5.5454.39504 C:\WINDOWS\SYSTEM32\MSVCR120.dll, version=12.00.21005.1 built by: REL C:\WINDOWS\SYSTEM32\VCOMP120.DLL, version=12.00.21005.1 built by: REL C:\WINDOWS\SYSTEM32\MSVCP120.dll, version=12.00.21005.1 built by: REL C:\WINDOWS\SYSTEM32\PROPSYS.dll, version=7.00.9600.17031 (winblue_gdr.140221-1952) C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.17415_none_932b3b5547500489\gdiplus.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\dxgi.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\profapi.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\clbcatq.dll, version=2001.12.10530.17415 (winblue_r4.141028-1500) C:\WINDOWS\System32\UIAnimation.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\dwmapi.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.17810_none_6240b9c7ecbd0bda\comctl32.dll, version=6.10 (winblue_rtm.130821-1623) C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9600.17810_none_34ae2abd958aedeb\comctl32.dll, version=6.10 (winblue_rtm.130821-1623) C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Configuration\1c7a457d4b8d2639fde389692c9e4e22\System.Configuration.ni.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Xml\06d95097745c54f7d28868ff547803c4\System.Xml.ni.dll, version=4.0.30319.34230 built by: FX452RTMGDR C:\WINDOWS\SYSTEM32\WindowsCodecs.dll, version=6.3.9600.17669 (winblue_r8.150128-1500) C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.resources\v4.0_4.0.0.0_fi_b77a5c561934e089\System.Windows.Forms.resources.dll, version=4.0.30319.36213 built by: FX452RTMLDR C:\WINDOWS\SYSTEM32\wtsapi32.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\WINSTA.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\d2d1.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\d3d11.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\D3D10Warp.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Xaml\70b996c41f005f060f131cd1e46a517d\System.Xaml.ni.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\SYSTEM32\aticfx64.dll, version=8.17.10.1395 C:\WINDOWS\SYSTEM32\WINMM.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\WINMMBASE.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\cfgmgr32.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\DEVOBJ.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\atiuxp64.dll, version=8.14.01.6463 C:\WINDOWS\SYSTEM32\atidxx64.dll, version=8.17.10.0625 C:\WINDOWS\system32\explorerframe.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\DUser.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\DUI70.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Program Files\Paint.NET\FileTypes\OpenRasterFiletype.dll, version=1.4.0.0 C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\WindowsForm0b574481#\42dedd9af0471c81188e2f6025726c51\WindowsFormsIntegration.ni.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\WINDOWS\System32\comdlg32.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\SETUPAPI.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\XmlLite.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\LINKINFO.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\apphelp.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\NetworkExplorer.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Windows\System32\Windows.Globalization.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Windows\System32\Bcp47Langs.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\globinputhost.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\StructuredQuery.dll, version=7.00.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\system32\actxprxy.dll, version=6.3.9600.17905 (winblue_ltsb.150615-0906) C:\WINDOWS\SYSTEM32\atlthunk.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\Windows\System32\thumbcache.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\IDStore.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\SAMLIB.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\System32\wlidprov.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\SspiCli.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\Windows\System32\oleacc.dll, version=7.2.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\MPR.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\drprov.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\RemoteFileBrowse.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\framedynos.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\System32\ntlanman.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\davclnt.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\System32\DAVHLPR.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\System32\wkscli.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\SYSTEM32\cscapi.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\System32\netutils.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\Windows\System32\dlnashext.dll, version=12.0.9600.16384 (winblue_rtm.130821-1623) C:\Windows\System32\PlayToDevice.dll, version=12.0.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\WS2_32.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\NSI.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\Windows\System32\twinapi.dll, version=6.3.9600.17031 (winblue_gdr.140221-1952) C:\Windows\System32\twinapi.appcore.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Windows\System32\DevDispItemProvider.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\system32\SearchFolder.dll, version=6.3.9600.17031 (winblue_gdr.140221-1952) C:\Windows\System32\EhStorShell.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\Program Files (x86)\Google\Drive\googledrivesync64.dll, version=1.23.9648.8824 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_08e793bfa83a89b5\MSVCP90.dll, version=9.00.30729.8387 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_08e793bfa83a89b5\MSVCR90.dll, version=9.00.30729.8387 C:\Windows\System32\PortableDeviceApi.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\cscui.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\CSCDLL.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\system32\WINTRUST.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\system32\CRYPT32.dll, version=6.3.9600.16431 (winblue_gdr.131015-2301) C:\WINDOWS\system32\MSASN1.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\Windows\System32\PortableDeviceTypes.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\system32\mssprxy.dll, version=7.00.9600.17415 (winblue_r4.141028-1500) C:\Windows\System32\EhStorAPI.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\ntshrui.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\SYSTEM32\srvcli.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) C:\WINDOWS\System32\urlmon.dll, version=11.00.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\iertutil.dll, version=11.00.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\WININET.dll, version=11.00.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\System32\USERENV.dll, version=6.3.9600.16384 (winblue_rtm.130821-1623) C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_fi_b77a5c561934e089\mscorlib.resources.dll, version=4.0.30319.34209 built by: FX452RTMGDR C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll, version=12.0.20806.33440 built by: FX45W81RTMREL C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrcompression.dll, version=4.0.30319.33440 built by: FX45W81RTMREL C:\WINDOWS\system32\psapi.dll, version=6.3.9600.17415 (winblue_r4.141028-1500) ------------------------------------------------------------------------------
- 1
-
Can't repro in 4.0.5 with Windows 8.1. Even with focus lost, Ctrl+V does nothing. I can click the main window once after losing focus that doesn't sound an alarm but after that any click produces an alarm.Can repro in 4.0.5 with Windows 8.1. It's bit complicated and very picky about how you get focus again.
I've been able to get this if I copy the image to the clipboard before pressing save and then get focus to paint.net from the taskbar instead of clicking the main window. And then press Ctrl+V.
- 1
-
-
Added mimetype checking, should work, tested it with broken files and such...
Hidden Content:// Author of OraFormat.cs: 2010 Maia Kozheva <sikon@ubuntu.com> // // Copyright (c) 2010 Maia Kozheva <sikon@ubuntu.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // // Paint.NET Plugin - (c) 2015 null54 & Zagna using PaintDotNet; using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Xml; namespace OpenRaster_Filetype { public class OraFileType : FileType { private const int ThumbMaxSize = 256; private string mimetype_zip = "UEsDBBQAAAAAAAAAIQDHmvCMEAAAABAAAAAIAAAAbWltZXR5cGVpbWFnZS9vcGVucmFzdGVyUEsBAhQDFAAAAAAAAAAhAMea8IwQAAAAEAAAAAgAAAAAAAAAAAAAAKSBAAAAAG1pbWV0eXBlUEsFBgAAAAABAAEANgAAADYAAAAAAA=="; private static Dictionary<LayerBlendMode, string> BlendDict = new Dictionary<LayerBlendMode, string>() { { LayerBlendMode.Normal, "svg:src-over" }, { LayerBlendMode.Multiply, "svg:multiply" }, { LayerBlendMode.Additive, "svg:plus" }, { LayerBlendMode.ColorBurn, "svg:color-burn" }, { LayerBlendMode.ColorDodge, "svg:color-dodge" }, { LayerBlendMode.Reflect, "pdn-reflect" }, { LayerBlendMode.Glow, "pdn-glow" }, { LayerBlendMode.Overlay, "svg:overlay" }, { LayerBlendMode.Difference, "svg:difference" }, { LayerBlendMode.Negation, "pdn-negation" }, { LayerBlendMode.Lighten, "svg:lighten" }, { LayerBlendMode.Darken, "svg:darken" }, { LayerBlendMode.Screen, "svg:screen" }, { LayerBlendMode.Xor, "svg:xor" } }; private static Dictionary<string, LayerBlendMode> SVGDict = BlendDict.ToDictionary(x => x.Value, x => x.Key); public OraFileType() : base("OpenRaster", FileTypeFlags.SupportsLoading | FileTypeFlags.SupportsSaving | FileTypeFlags.SupportsLayers, new String[] { ".ora" }) { strokeMapVersions = new string[2] { "mypaint_strokemap", "mypaint_strokemap_v2" }; } /// <summary> /// Gets the bitmap from the ora layer. /// </summary> /// <param name="xofs">The x offset of the layer image.</param> /// <param name="yofs">The y offset of the layer image.</param> /// <param name="inStream">The input stream containing the layer image.</param> /// <param name="baseWidth">The width of the base document.</param> /// <param name="baseHeight">The height of the base document.</param> private unsafe Bitmap GetBitmapFromOraLayer(int xofs, int yofs, Stream inStream, int baseWidth, int baseHeight) { Bitmap image = null; using (Bitmap layer = new Bitmap(baseWidth, baseHeight)) { using (Bitmap bmp = new Bitmap(inStream)) { BitmapData layerData = layer.LockBits(new Rectangle(xofs, yofs, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, bmp.PixelFormat); int bpp = Bitmap.GetPixelFormatSize(bmp.PixelFormat) / 8; for (int y = 0; y < bmp.Height; y++) { for (int x = 0; x < bmp.Width; x++) { byte* dst = (byte*)layerData.Scan0.ToPointer() + (y * layerData.Stride) + (x * 4); byte* src = (byte*)bmpData.Scan0.ToPointer() + (y * bmpData.Stride) + (x * bpp); dst[0] = src[0]; // B dst[1] = src[1]; // G dst[2] = src[2]; // R if (bpp == 4) { dst[3] = src[3]; // A } else { dst[3] = 255; } } } bmp.UnlockBits(bmpData); layer.UnlockBits(layerData); } image = (Bitmap)layer.Clone(); } return image; } /// <summary> /// The formats for MyPaint's stroke map, version 1 and version 2. /// </summary> private readonly string[] strokeMapVersions; protected override Document OnLoad(Stream input) { using (ZipArchive file = new ZipArchive(input, ZipArchiveMode.Read)) { try { string mimetype; ZipArchiveEntry mime_entry = file.GetEntry("mimetype"); using (StreamReader reader = new StreamReader(mime_entry.Open())) { mimetype = reader.ReadToEnd(); } if (!mimetype.Equals("image/openraster", StringComparison.Ordinal)) throw new FormatException("Incorrect mimetype: " + mimetype); } catch (NullReferenceException) { throw new FormatException("No mimetype found in OpenRaster file"); } XmlDocument stackXml = new XmlDocument(); stackXml.Load(file.GetEntry("stack.xml").Open()); XmlElement imageElement = stackXml.DocumentElement; int width = int.Parse(imageElement.GetAttribute("w"), CultureInfo.InvariantCulture); int height = int.Parse(imageElement.GetAttribute("h"), CultureInfo.InvariantCulture); Document doc = new Document(width, height); XmlElement stackElement = (XmlElement)stackXml.GetElementsByTagName("stack")[0]; XmlNodeList layerElements = stackElement.GetElementsByTagName("layer"); if (layerElements.Count == 0) throw new FormatException("No layers found in OpenRaster file"); int layerCount = layerElements.Count - 1; for (int i = layerCount; i >= 0; i--) // The last layer in the list is the background so load in reverse { XmlElement layerElement = (XmlElement)layerElements[i]; int x = int.Parse(GetAttribute(layerElement, "x", "0"), CultureInfo.InvariantCulture); // the x offset within the layer int y = int.Parse(GetAttribute(layerElement, "y", "0"), CultureInfo.InvariantCulture); // the y offset within the layer int layerNum = layerCount - i; string name = GetAttribute(layerElement, "name", string.Format("Layer {0}", layerNum, CultureInfo.InvariantCulture)); ZipArchiveEntry zf = file.GetEntry(layerElement.GetAttribute("src")); using (Stream s = zf.Open()) { using (Bitmap bmp = GetBitmapFromOraLayer(x, y, s, width, height)) { BitmapLayer myLayer = null; if (i == layerCount) // load the background layer first { myLayer = Layer.CreateBackgroundLayer(width, height); } else { myLayer = new BitmapLayer(width, height); } myLayer.Name = name; myLayer.Opacity = ((byte)(255.0 * double.Parse(GetAttribute(layerElement, "opacity", "1"), CultureInfo.InvariantCulture))); myLayer.Visible = (GetAttribute(layerElement, "visibility", "visible") == "visible"); // newer ora files have this try { myLayer.BlendMode = SVGDict[GetAttribute(layerElement, "composite-op", "svg:src-over")]; } catch (KeyNotFoundException) { myLayer.BlendMode = LayerBlendMode.Normal; } myLayer.Surface.CopyFromGdipBitmap(bmp, false); // does this make sense? string backTile = GetAttribute(layerElement, "background_tile", string.Empty); if (!string.IsNullOrEmpty(backTile)) { ZipArchiveEntry tileZf = file.GetEntry(backTile); byte[] tileBytes = null; using (Stream tileStream = tileZf.Open()) { tileBytes = new byte[(int)tileStream.Length]; int numBytesToRead = (int)tileStream.Length; int numBytesRead = 0; while (numBytesToRead > 0) { // Read may return anything from 0 to numBytesToRead. int n = tileStream.Read(tileBytes, numBytesRead, numBytesToRead); // The end of the file is reached. if (n == 0) { break; } numBytesRead += n; numBytesToRead -= n; } } string tileData = Convert.ToBase64String(tileBytes); // convert the tile image to a Base64String and then save it in the layer's MetaData. myLayer.Metadata.SetUserValue("OraBackgroundTile", tileData); } foreach (string version in strokeMapVersions) { string strokeMap = GetAttribute(layerElement, version, string.Empty); if (!string.IsNullOrEmpty(strokeMap)) { ZipArchiveEntry strokeZf = file.GetEntry(strokeMap); byte[] strokeBytes = null; using (Stream strokeStream = strokeZf.Open()) { strokeBytes = new byte[(int)strokeStream.Length]; int numBytesToRead = (int)strokeStream.Length; int numBytesRead = 0; while (numBytesToRead > 0) { // Read may return anything from 0 to numBytesToRead. int n = strokeStream.Read(strokeBytes, numBytesRead, numBytesToRead); // The end of the file is reached. if (n == 0) { break; } numBytesRead += n; numBytesToRead -= n; } } string strokeData = Convert.ToBase64String(strokeBytes); // convert the stroke map to a Base64String and then save it in the layer's MetaData. myLayer.Metadata.SetUserValue("OraMyPaintStrokeMapData", strokeData); // Save the version of the stroke map in the MetaData myLayer.Metadata.SetUserValue("OraMyPaintStrokeMapVersion", version); } } doc.Layers.Insert(layerNum, myLayer); } } } return doc; } } // A struct to store the new x,y offsets private struct LayerInfo { public int x; public int y; public LayerInfo(int x, int y) { this.x = x; this.y = y; } } protected override void OnSave(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback) { byte[] databytes = Convert.FromBase64String(mimetype_zip); output.Write(databytes, 0, databytes.Length); using (ZipArchive archive = new ZipArchive(output, ZipArchiveMode.Update, true)) { LayerInfo[] layerInfo = new LayerInfo[input.Layers.Count]; for (int i = 0; i < input.Layers.Count; i++) { BitmapLayer layer = (BitmapLayer)input.Layers[i]; Rectangle bounds = layer.Surface.Bounds; int left = layer.Width; int top = layer.Height; int right = 0; int bottom = 0; unsafe { for (int y = 0; y < layer.Height; y++) { ColorBgra* row = layer.Surface.GetRowAddress(y); ColorBgra* pixel = row; for (int x = 0; x < layer.Width; x++) { if (pixel->A > 0) { if (x < left) { left = x; } if (x > right) { right = x; } if (y < top) { top = y; } if (y > bottom) { bottom = y; } } pixel++; } } } if (left < layer.Width && top < layer.Height) // is the layer not empty { bounds = new Rectangle(left, top, (right - left) + 1, (bottom - top) + 1); // clip it to the visible rectangle layerInfo[i] = new LayerInfo(left, top); } else { layerInfo[i] = new LayerInfo(0, 0); } string tileData = layer.Metadata.GetUserValue("OraBackgroundTile"); if (!string.IsNullOrEmpty(tileData)) // save the background_tile png if it exists { ZipArchiveEntry bgtile = archive.CreateEntry("data/background_tile.png"); using (Stream streamy = bgtile.Open()) { byte[] tileBytes = Convert.FromBase64String(tileData); streamy.Write(tileBytes, 0, tileBytes.Length); } } string strokeData = layer.Metadata.GetUserValue("OraMyPaintStrokeMapData"); if (!string.IsNullOrEmpty(strokeData)) // save MyPaint's stroke data if it exists { ZipArchiveEntry strokemap = archive.CreateEntry("data/layer" + i.ToString(CultureInfo.InvariantCulture) + "_strokemap.dat"); using (Stream streamy = strokemap.Open()) { byte[] tileBytes = Convert.FromBase64String(strokeData); streamy.Write(tileBytes, 0, tileBytes.Length); } } byte[] buf = null; using (MemoryStream ms = new MemoryStream()) { layer.Surface.CreateAliasedBitmap(bounds, true).Save(ms, ImageFormat.Png); buf = ms.ToArray(); } ZipArchiveEntry layerpng = archive.CreateEntry("data/layer" + i.ToString(CultureInfo.InvariantCulture) + ".png"); using (Stream streamy = layerpng.Open()) { streamy.Write(buf, 0, buf.Length); } } ZipArchiveEntry stackxml = archive.CreateEntry("stack.xml"); using (Stream streamy = stackxml.Open()) { databytes = GetLayerXmlData(input.Layers, layerInfo); streamy.Write(databytes, 0, databytes.Length); } using (Surface flat = new Surface(input.Width, input.Height)) { input.Flatten(flat); using (MemoryStream ms = new MemoryStream()) { flat.CreateAliasedBitmap().Save(ms, ImageFormat.Png); databytes = ms.ToArray(); } ZipArchiveEntry mergy = archive.CreateEntry("mergedimage.png"); using (Stream streamy = mergy.Open()) { streamy.Write(databytes, 0, databytes.Length); } Size thumbSize = GetThumbDimensions(input.Width, input.Height); Surface scale = new Surface(thumbSize); scale.FitSurface(ResamplingAlgorithm.SuperSampling, flat); using (MemoryStream ms = new MemoryStream()) { scale.CreateAliasedBitmap().Save(ms, ImageFormat.Png); databytes = ms.ToArray(); } scale.Dispose(); ZipArchiveEntry thumbsy = archive.CreateEntry("Thumbnails/thumbnail.png"); using (Stream streamy = thumbsy.Open()) { streamy.Write(databytes, 0, databytes.Length); } } } System.Diagnostics.Debug.WriteLine("All done here"); } private byte[] GetLayerXmlData(LayerList layers, LayerInfo[] info) // OraFormat.cs - some changes { byte[] buf = null; using (MemoryStream ms = new MemoryStream()) { XmlTextWriter writer = new XmlTextWriter(ms, System.Text.Encoding.UTF8); writer.Formatting = Formatting.Indented; writer.WriteStartDocument(); writer.WriteStartElement("image"); writer.WriteAttributeString("w", layers.GetAt(0).Width.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("h", layers.GetAt(0).Height.ToString(CultureInfo.InvariantCulture)); writer.WriteStartElement("stack"); // ORA stores layers top to bottom for (int i = layers.Count - 1; i >= 0; i--) { BitmapLayer layer = (BitmapLayer)layers[i]; writer.WriteStartElement("layer"); string backTile = layer.Metadata.GetUserValue("OraBackgroundTile"); if (!string.IsNullOrEmpty(backTile)) { writer.WriteAttributeString("background_tile", "data/background_tile.png"); } string strokeMapVersion = layer.Metadata.GetUserValue("OraMyPaintStrokeMapVersion"); if (!string.IsNullOrEmpty(strokeMapVersion)) { writer.WriteAttributeString(strokeMapVersion, "data/layer" + i.ToString(CultureInfo.InvariantCulture) + "_strokemap.dat"); } if (string.IsNullOrEmpty(strokeMapVersion)) // the stroke map layer does not have a name { writer.WriteAttributeString("name", layer.Name); } writer.WriteAttributeString("opacity", ((double)(layer.Opacity / 255.0)).Clamp(0.0, 1.0).ToString("N2", CultureInfo.InvariantCulture)); // this is even more bizarre writer.WriteAttributeString("src", "data/layer" + i.ToString(CultureInfo.InvariantCulture) + ".png"); writer.WriteAttributeString("visible", layer.Visible ? "visible" : "hidden"); writer.WriteAttributeString("x", info[i].x.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("y", info[i].y.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("composite-op", BlendDict[layer.BlendMode]); writer.WriteEndElement(); } writer.WriteEndElement(); // stack writer.WriteEndElement(); // image writer.WriteEndDocument(); writer.Close(); buf = ms.ToArray(); } return buf; } private Size GetThumbDimensions(int width, int height) // OraFormat.cs { if (width <= ThumbMaxSize && height <= ThumbMaxSize) return new Size(width, height); if (width > height) return new Size(ThumbMaxSize, (int)((double)height / width * ThumbMaxSize)); else return new Size((int)((double)width / height * ThumbMaxSize), ThumbMaxSize); } private static string GetAttribute(XmlElement element, string attribute, string defValue) // OraFormat.cs { string ret = element.GetAttribute(attribute); return string.IsNullOrEmpty(ret) ? defValue : ret; } } public class MyFileTypeFactory : IFileTypeFactory { public FileType[] GetFileTypeInstances() { return new FileType[] { new OraFileType() }; } } }
-
For my main desktop, within couple of days of release if not on the first day. Already got Insider Preview on my little netbook.
-
I might have fixed it I found this by googling through stackoverflow
I made a .zip containing only the mimetype uncompressed. Fudged it in the source code via base64, opened the zip and skipped the mimetype bit entirely. It only adds layers and xml stuff and so on.
midora, rename that file to .ora and check if it is ok?
-
Hmm... since I changed to .NET ZipArchive....
ZipArchiveEntry mimetype = archive.CreateEntry("mimetype", CompressionLevel.NoCompression);
So that's a bit different than what null54 has here earlier.... back then there was CompressionMethod.
Hmm... remove ZipArchive and...?
-
In .ora blend modes are setup using SVG 1.2. The plugin translates the paint.net modes into SVG 1.2 modes and the other way around. Blends, opacity, visibility and names stored in an xml.
But it only saves in png and yours has many more formats so there's quite a difference.
Anyway.... good luck with this plugin, hope you get only few uncaught exceptions
-
You're trying to make essentially an openraster plugin?
.ora is a zipped file containing an xml file explaining the layers and .png of all layers.
-
I'm able to type numbers just fine with just the numpad. 123,456 no dot. Works just well.
Maybe the regional settings of your keyboard something other than belgian/french? Because there is display language, keyboard language, application language and regional day+time+numbers setting.
I have every possible setting set to finnish so I don't get a dot from the numpad.
-
Damn... I can't see it in white and gold... I can get the gold to change to black but the blue remains blue.
So I say it's either (lightish) blue/gold or blue/black.
-
Yay, i'm back
- 1
-
I've been getting error 403 on my main isp connection for a while now. Saw it first around new year and thought it was just an error but it's still there so something else is going on.
It seems I can access the forum through my phones 3G atleast.
Admins help... -
How about OpenRaster Filetype
Since bunch of .ora stuff use Python like this for example, so maybe it could be easyish?
-
If you want text bigger than 2000, I just tried Irfanview and it easily let me write with size 6000. And it supports various effects and backgrounds and even doing multiple images at once.
-
Discovered bug:
-Open any image (fairly large though).
-Create a new file, size 100x100px.
-Paste the large image onto a new layer on the 100x100 file.
-Resize the large image.
For me it goes completely white.
Repros sort of. If I create any size canvas, let's say 1000x1000 and paste a 4000x4000 image to it without expanding the canvas.
After this I can move the image without problems and get part of the image showing on canvas ok.
If I resize the large image in any way for any amount, all but the left topmost corner the size of the canvas goes transparent.
- 1
Reproducible crash: 'expand canvas' dialog on top of save dialog
in Troubleshooting & Bug Reports
Posted · Edited by Zagna
Windows 10+pdn 4.0.6 version of the error report. Small difference in the exception details.