Jump to content
How to Install Plugins ×

Save for Web with RIOT (Radical Image Optimization Tool)


null54

Recommended Posts

This is an Effect plugin that allows Paint.NET to export the current layer using RIOT.
Menu location: Effects->Tools->Save for Web with RIOT.


Note that the RIOT UI may be slow to launch with larger images.

 

btn_donate_SM.gif
 To install place the SaveForWebRIOT folder in the Paint.NET Effects folder which is usually located in one the following locations depending on the Paint.NET version you have installed.

 

  Classic: C:\Program Files\Paint.NET\Effects
  Microsoft Store: Documents\paint.net App Files\Effects
  Portable: <Paint.NET folder>\Effects

 

Download:


SaveForWebRIOT.zip

 

Source Code:


https://github.com/0xC0000054/pdn-riot

  • Upvote 6

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Thanks for the quick effort on the request from a user ;-)

 

I'm not getting it to run with 4.0.9 and Windows 8.1. The four files are in the Effects folder.

Clicking the menu entry in the Tools menu just shows for a second the typical effects progressbar but a riot dialog does not open.

midoras signature.gif

Link to comment
Share on other sites

I'm not getting it to run with 4.0.9 and Windows 8.1. The four files are in the Effects folder.

Clicking the menu entry in the Tools menu just shows for a second the typical effects progressbar but a riot dialog does not open.

 

Strange, I have no idea what that could be it works fine for me on 4.0.9 with Windows 10.

Unfortunately the RIOT library is a bit of a black box, even with the GIMP plugin source code it took me several hours to create a DIB in the format that it needed to show the UI.

I updated the version in the first post to check the proxy exit code and display the appropriate error messages, file version updated to 1.0.0.1.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

I tried to download it but Avast blocked it. It said something like "Win32:Evo gen [susp]" 

 

That sounds like a false positive, according to VirusTotal only Avast detects the plugin as malware.

It probably occurs because the RIOT and FreeImage dlls are compressed.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

OK. the dlls are in the effect folder but it crashes with this error message :
 
This text file was created because paint.net crashed. Please e-mail this to crashlog4@getpaint.net so we can diagnose and fix the problem.
 
 
 
Application version: paint.net 4.0.9 (Final 4.9.5848.30436)
 Time of crash: 2/4/2016 9:01:51 PM
 Application uptime: 00:00:53.1200990
 Application state: Running 
 Working set: 224,156 KiB
 Threads: 32
 Install directory: C:\Program Files\paint.net
 Current directory: C:\Program Files\paint.net
 OS Version: 6.1.7601.65536 Service Pack 1 Workstation x86
 .NET version: CLR 4.0.30319.42000 x86, FX 4.6
 Processor: 4x "Intel® Core2 Quad  CPU   Q9550  @ 2.83GHz" @ ~2826MHz (DEP, SSE, SSE2, SSE3, SSSE3, SSE4_1)
 Physical memory: 3325 MB
 Video card: ATI Radeon HD 2400 Pro (v:1002, d:94C1, r:0)
 Hardware acceleration: True (default: True)
 UI animations: True
 UI DPI: 96.00 dpi (1.00x scale)
 UI theme: Aero/Aero + DWM (Aero.msstyles)
 Updates: False, 11/28/2014
 Locale: pdnr.c: en-US, hklm: en-US, hkcu: en-US, cc: en-US, cuic: en-US
 
Flags: 
   
Exception details:
 System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at System.Diagnostics.Process.Start()
    at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
    at SaveForWebRIOT.RIOTExportConfigDialog.OnLoad(EventArgs e)
    at System.Windows.Forms.Form.OnCreateControl()
    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    at System.Windows.Forms.Control.CreateControl()
    at System.Windows.Forms.Control.WmShowWindow(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.Form.WmShowWindow(Message& m)
    at System.Windows.Forms.Form.WndProc(Message& m)
    at PaintDotNet.PdnBaseForm.WndProc(Message& m) in D:\src\pdn\src\Core\PdnBaseForm.cs:line 1676
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

 

 

 

EDIT: It is working now. But only when I stop AVAST.

Edited by Eli
Link to comment
Share on other sites

Just tested it out and it works fine here (PDN 4.0.9 / Win10). The hourglass keeps going, but the image is already made. I have to close out the plugin to kill the hourglass thinggy. It works and makes the image substantially smaller. I like how you can specify color sub-sampling if you want to.

69unju0.gif

Link to comment
Share on other sites

1.0.0.1 shows the alert: FreeImage was unable to load the exported layer. After OK, I get the same behaviour as before.

 

This should be fixed in 1.0.0.2.

 

does not work.

I tried to install the Reut out of your hand and luci.criosweb.ro/риот

all actions lead to a drop in Paint

 

Did you place all of the required files in the Effects folder?

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

 

Did you place all of the required files in the Effects folder?

Ups.

 

all files are moved to a folder paint.net\Effects

exe file  RIOTProxy and also  :D

 

sq3nyauvrba0.jpg

2voh2xougmwx.jpg

Link to comment
Share on other sites

1.0.0.2 shows for a short while a dialog

 

Shim application to allow RIOT to be used by

64bit Pai has stopped working

Windows is checking for a solution to the problem

 

and then just goes away. Paint.NET stays alive.

midoras signature.gif

Link to comment
Share on other sites

1.0.0.2 shows for a short while a dialog

 

Shim application to allow RIOT to be used by

64bit Pai has stopped working

Windows is checking for a solution to the problem

 

and then just goes away. Paint.NET stays alive.

 

I do not have any idea what the problem could be. :/

Try opening a command prompt in the Effects folder and running the RIOTProxy executable with the path to a PNG file as the argument, the console output may provide more information about what is failing.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

I'm getting the same dialog in the console.

And later the exception:

 

Unhandled Exception: System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(String filename)
   at RIOTProxy.Program.CreateDIBFromBitmap(String fileName, IntPtr& dibHandle,
Int64& dibSize, Boolean& useVirtualFree)
   at RIOTProxy.Program.Main(String[] args)

 

I did some test and the RIOT dialog opens in some paths.

 

The problem maybe that some of my paths and filenames contain spaces. So I expect RIOT just gets part of the filename and fails.

midoras signature.gif

Link to comment
Share on other sites

It appears that GDI+ refuses to load some images that the plugin saves, which is strange because GDI+ is what the plugin uses to save the layer. :roll:

That should be fixed in 1.0.0.3, as I now use WIC to load the images that the plugin exports.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

I'm getting with 1.0.0.3 the alert

WIC was unable to load the exported layer.

 

What does it say when you run it from the command line?

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

It works from the commandline.

Just to say. Even my TEMP path contains spaces.

 

The bug with spaces in the image path is fixed in 1.0.0.4.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

1.0.0.4 shows an alert:

  No registered JIT debugger was specified.

But it works after clicking on Cancel.

 

I accidentally used the Debug build when updating the zip. :roll:

The first post has been updated with the Release build.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

OK, thanks.

 

I'm fighting a bit on my highdpi screen. Expecially I can't read the result size value just the KiB at the end. The rest is overridden by

"Optimized ima". For sure at the end a RIOT issue but I thought that the previous test builds of the package didn't show this issue.

Maybe it depends on what the process inherits from Paint.NET.

midoras signature.gif

Link to comment
Share on other sites

Fixed a bug with RIOT always detecting exported images as having transparency.
Reduced memory usage when exporting images.

Plugin file version updated to 1.0.6.

  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Updated to RIOT version 0.6.1.
Launch the RIOT executable on a background thread so that the Paint.NET window can update when the plugin is running.

Plugin file version updated to 1.0.7.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...