Sign in to follow this  
null54

Save for Web with RIOT (Radical Image Optimization Tool)

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 FreeImage.dll, RIOT.dll, SaveForWebRIOT.dll and RIOTProxy.exe in the Effects folder.

 

Download:


SaveForWebRIOT.zip

 

Source Code:


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

  • Upvote 6

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Hello null54,

 

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

Edited by Eli

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this