nickgravelyn Posted December 13, 2009 Share Posted December 13, 2009 I'm working on a FileType plugin, the goal of which is to be able to compose an animation strip (a set of frames laid out horizontally) and have it save an animated GIF file. I'm sure I can manage that portion just fine but I also wanted to be able to load an animated GIF file and make a strip out of the frames. I'm able to do this with code just fine but it seems that Paint.NET will always use the standard GIF loader when loading the file, even if I explicitly choose my "Animated Gif File" option from the load dialog. Is there any way to get Paint.NET to use my plugin instead of the default file type? Or somehow get rid of the existing GIF loader? (As a side note it might be nice to make the standard file loading and saving as plugins that way users could simply delete the old GIF plugin DLL and put mine in place of it.) Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted December 13, 2009 Share Posted December 13, 2009 There's already such a plugin: viewtopic.php?f=16&t=28407 Quote Link to comment Share on other sites More sharing options...
nickgravelyn Posted December 13, 2009 Author Share Posted December 13, 2009 Thanks for pointing that out, but it suffers a few issues I don't like: 1) It puts each frame on a layer instead of laying them out in a sheet. 2) They, too, have to use a new extension "agif". This may not be solvable, though. If I can't solve the second, then I guess I'll just have to deal with it, but I definitely prefer animation strips over using layers as frames. Personal preference, I suppose. So back to the issue at hand, anyone know of a way to get Paint.NET to use my plugin for a GIF file or am I forced to use a different extension? Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted December 13, 2009 Share Posted December 13, 2009 Not without using ugly workarounds that'd probably get your plugin removed. Quote Link to comment Share on other sites More sharing options...
nickgravelyn Posted December 13, 2009 Author Share Posted December 13, 2009 I don't want to hack up a solution using reflection, not because of whether I can list the plugin here, but because it makes the plugin unstable to future updates in the event that they change something as minimal as a field's name. Definitely not a can of worms I want to deal with. Since my thread in the suggestion forum was closed as a cross-post of this, I definitely hope that the PDN team can realize that this is an oversight and it should be corrected. Not only for things for animated GIFs, but for any file type. It's possible that a plugin developer could make something that exposes more functionality or performs better/differently for a given file, but currently the application doesn't allow users to choose those plugins over the internal file types. Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted December 14, 2009 Share Posted December 14, 2009 I don't want to hack up a solution using reflection, not because of whether I can list the plugin here, but because it makes the plugin unstable to future updates in the event that they change something as minimal as a field's name. Definitely not a can of worms I want to deal with. I wasn't encouraging you to, which is why my plugin uses a different extension. If users want to edit animated PNGs and still have the file with the correct extension available, I guess they could be pointed to a tutorial on symbolic links. Quote Link to comment Share on other sites More sharing options...
nickgravelyn Posted December 14, 2009 Author Share Posted December 14, 2009 If users want to edit animated PNGs and still have the file with the correct extension available, I guess they could be pointed to a tutorial on symbolic links.Or support for overriding default file extensions for loading will get implemented so users don't have to be hassled. I actually found out that my plugin can save out to a standard GIF extension just fine, i.e. it doesn't default to the standard GIF FileType when I save if I explicitly choose my file type from the drop down menu. However the same doesn't work when loading. So it seems like all that needs doing is to see whether the user, when loading a file, explicitly chose the plugin file type or not. But for now I'll just tell people to change the file extension to "agif" before opening the file if they want to read a GIF file. To me saving was far more the important factor and that works just fine, so I consider my plugin a success for me at least. Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted December 14, 2009 Share Posted December 14, 2009 I actually found out that my plugin can save out to a standard GIF extension just fine, i.e. it doesn't default to the standard GIF FileType when I save if I explicitly choose my file type from the drop down menu. However the same doesn't work when loading. So it seems like all that needs doing is to see whether the user, when loading a file, explicitly chose the plugin file type or not. Or force all FileTypes covering duplicate extensions to have config dialogs and make it changeable there. file extension to "agif" Although you should probably use another extension, in case users have both plugins installed. Quote Link to comment Share on other sites More sharing options...
barkbark00 Posted December 14, 2009 Share Posted December 14, 2009 Check out I Like Pi's source for OptiPNG file type plugin. His output option shows up as "Optimized PNG (*.png)". That extension is a duplicate of PnD's native PNG support. Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
Simon Brown Posted December 14, 2009 Share Posted December 14, 2009 Check out I Like Pi's source for OptiPNG file type plugin. His output option shows up as "Optimized PNG (*.png)". That extension is a duplicate of PnD's native PNG support. Wrong link by the way. Correct one: viewtopic.php?f=16&t=20637 Quote Link to comment Share on other sites More sharing options...
barkbark00 Posted December 14, 2009 Share Posted December 14, 2009 Wrong link by the way.Correct one: viewtopic.php?f=16&t=20637 LOL, mine takes you to http://paintdotnet.forumer.com/viewtopic.php?f=16&t=2063...missing the 7! Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.