midora Posted November 6, 2021 Share Posted November 6, 2021 (edited) 'GIF Animations and Images' FileType Plugin (.GIF, .AGIF) Download Find the latest version of the plugin here: ImAGIF.FileType v1.5.zip [2021-11-16] Thumbnail support for .agif file type: ImAGIF.Thumbnail v1.0.zip [2021-11-18] Installer for ImAGIF.Thumbnail: ImXYZ.Thumbnail.dll Installer v1.0.zip [2021-11-18] Some example .pdn files used to create simple animated gifs: ImAGIF.Examples v1.0.zip Summary Loads and saves GIF animation files. Animated images contain a sequence of images called frames which a viewer application can show as an animation. On load the plugin loads all frames from the file and adds them as layers to a new Paint.NET document. Frame 1 will become the bottom layer and so on. Some information from the file (like frame duration or comments) will be stored in the layer names after the marker '//'. On save the plugin will convert all layers to frames respecting the information found after the marker '//' in the layer names. The plugin does its best to reduce the size of the final file. The size depends on various settings. Animated GIF file format restrictions Maximum number of colors is 256 (transparency count as one color) No alpha transparency. Only opaque and fully transparent colors are possible See also 'WEBP Animations and Images' FileType Plugin 'PNG Animations and Images' FileType Plugin Keywords FileType, GIF, AGIF, Animated GIF, Animation Author / Copyright Martin Osieka 2014-2021, Martin Osieka, Switzerland You may use this plugin together with Paint.NET w/o any restriction. Installation Follow the instructions carefully Unzip the archive Copy the folder ImAGIF.FileType together with its content (ImAGIF.FileType.dll/.dlc/.deps.json) into the FileTypes folder of paint.net. The location of the FileTypes folder depends on the installed variant of paint.net. To avoid conflicts with other filetype plugins which support the same extension you should remove or disable them (i.e. AnimGIF.dll). To verify the installation you should restart Paint.NET and check that in the filetype popup of the open file selector dialog is an entry starting with AGIF. Compatibility Paint.NET >= 4.3.2 Supported languages The language used in the plugin depends on the language setting of Paint.NET and the support of this language by the plugin. The fallback is the first supported language of the plugin. Languages are defined in the .dlc files. This plugin supports the following languages in the moment: English Deutsch Tutorials @Pixey Make an animated gif with Midora's Plugin 'Save dialog' options The options on the top allow you to define and test the basic type of the image: File variant: GIF Animation GIF Image Preview button: Only enabled if the file variant is GIF Animation. Creates a temporary file containing the animation and plays the file in a preview window. Right click the preview window to get a context menu containing several commands. As long as you do not close the 'Save Configuration' dialog with OK the original file is still intact. So this feature allows you to test your animation without saving to a file. Depending on the variant you can define some initial settings in the dialog. Initial means that they will be redefined if the related commands are used in the layer names. Comment: see Comment= Maximum number of colors: see MaxColors= Dithering level: see DitherLevel= Threshold: see Threshold= Frame duration: see Duration= Cycles: see Cycles= Remove duplicates from frames: see NoDups= 'Load dialog' options None Commands defined in the layer names See ImAGIF.FileType.ReadMe.txt How to create/edit an animated GIF See ImAGIF.FileType.ReadMe.txt Credits Rick Brewster for the Octree Quantization implementation used to reduce the amount of colors. History 1.5 [2021-11-16] - Fixed a bug regarding the offset of sub frames (introduced in 0.13.2) - Added simple preview 1.4 (6.11.2021) - Created a new topic in the 'FileType Plugins' section (old topic is Animated Images) - Updated code to support paint.net 4.3.2 (replaced obsolete and deprecated methods) - Shifted the version number from 0.13 to 1.4 - Prepared for future improvements 0.13 (12.7.2019) - Rick Brewster This plugin didn't work with Paint.NET 4.2 because it used a class that's now flagged "internal". This has been fixed in v0.13. 0.12 (17.8.2015) - Fix to handle GIFs containing corrupted XMP metadata 0.11 (6.4.2015) - Added switch to create non-animated GIFs from flattened layers - Added support to load true color gifs (save is disabled, because most viewers are not able to view them correct and Animated GIFs are not able to support true color). - Added 'NoDups' command (default: true) and dialog option. 0.10 (3.4.2015) - Added some initial options to the save dialog. These options will be overridden if their related commands are used in the layer titles. 0.9 (2.4.2015) - Added "Duplicate=N,M" command, which duplicates the last N frames sequence M times. M is optional with a default value of 1. - Added optional origin coordinates to the sprite command. "sprite=NAME,X,Y" - Added "DitherLevel=N" 0 <= N <= 8, default is 7. Dithering is used in low color filetypes to avoid banding of colors. The advantage of dithering is a better quality of the final image. The disadvantage is that the file size may increase. - Changed the definition of background and foreground command a bit to allow to switch off usage of a background and foreground and not just to replace it. - Declared the command names background, foreground, default, skip, and sprite as depreciated. The new names are: UseAsBackground, UseAsForeground, UseAsDefault, UseAsNote, UseAsSprite The prefix UseAs indicates that the layer will not create a new frame. - N fps (frames per second) is allowed now to define the duration. 0.8 (30.3.2015) - Removes duplicates (frames with the same content as the previous one) by removing the frame and incrementing the duration of the previous frame. - Because some image hosters deliver html code in a gif file instead of an image the filetype throws now a more descriptive exception on load of a GIF: "File contains an HTML document but not a GIF image" - Added two commands which allow to animate sprites on frames "sprite=NAME" defines the layer content as a sprite with the name NAME. A sprite layer can be drawn at any position in the layer stack. Sprite names are not case-sensitive and must be unique. Don't use whitespace or any delimiters in the names. "draw=NAME,X,Y" draws the sprite NAME to the frame generated from the current layer. X and Y are optional and define how much pixels the sprite should be moved (default: no move). Multiple 'draw' commands are allowed in a layer name. The sprite layer should be transparent because the content will be blended on top of the current frame. 0.7 (26.3.2015) - fixes an issue on XP and some Win7 installations where cloning of the bitmaps provided by the layers will return the original ones. So the filetype may corrupt the layer content in version 0.6. - added optional parameter to the 'reverse' command to define the number of frames to reverse. - added transition 'Blinds=D' (D may be hor or ver) - '://' sequences are allowed now in comments because this sequence is needed for URLs (all other '//' sequences will be removed from comments because they are used to start a command sequence in the layer names) 0.6 (21.3.2015) - New setting 'GIF'. Will be added to the first layer on load (just a hint for other tools about the source of the layers). - New setting 'reverse'. Adds all frames generated up to the current layer in reverse order to the animation (not including the first and the current frame) 0.5 (17.3.2015) - added 'default' setting. Not used by agif, has the same effect as 'skip' - added transition=T,V,D comamnd to create additional frames in-between existing ones. 0.4 (14.3.2015) - A basic quantization variant is working - maxcolors=N; may be used to reduce the colors, default is 256; minimum is 8 - Added 'Animating in paint.net is easy.pdn' to demonstrate usage of background and foreground. 0.3 (12.3.2015) - First public test release Edited January 16, 2022 by midora 2 4 1 Quote Link to comment Share on other sites More sharing options...
midora Posted November 6, 2021 Author Share Posted November 6, 2021 Finally moved the plugin from the 'Plugin Developer's Central/Animated Images' to the 'FileType Plugins' section 😉 1 Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 6, 2021 Share Posted November 6, 2021 Well done @midora. Another successful transition of a very popular Filetype to NetCoreApp v5.0 Quote Link to comment Share on other sites More sharing options...
Pixey Posted November 6, 2021 Share Posted November 6, 2021 Yay Thank you @midora 👍 BTW - love your Avvie and Signature 😻 Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
Rle Posted November 6, 2021 Share Posted November 6, 2021 (edited) 👍 Edited September 9, 2022 by Rle Quote Link to comment Share on other sites More sharing options...
midora Posted November 7, 2021 Author Share Posted November 7, 2021 (edited) Thanks folks, let's hope there is enough time to upgrade all the other plugins until paint.net switches to .net 6 😉 And special thanks to @toe_head2001, @Rick Brewster, and @null54 keeping the plugin running while I was absent. Edited November 9, 2021 by midora Quote Link to comment Share on other sites More sharing options...
midora Posted November 7, 2021 Author Share Posted November 7, 2021 Small example of what I just did for one of my tools 1 1 1 Quote Link to comment Share on other sites More sharing options...
Pixey Posted November 7, 2021 Share Posted November 7, 2021 51 minutes ago, midora said: Small example of what I just did for one of my tools Wow! Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
midora Posted November 9, 2021 Author Share Posted November 9, 2021 Just to say, the 1.4 version is based on the latest modifications/optimizations done by @null54. Quote Link to comment Share on other sites More sharing options...
midora Posted November 14, 2021 Author Share Posted November 14, 2021 Added .agif shell extension to the first post. It provides thumbnail support for the file type .agif in Windows Explorer. I'm not able to delete really old stuff, so I can not upload 'ImAPNG.FileType' and 'ImAPNG.Thumbnail' in the moment... Quote Link to comment Share on other sites More sharing options...
midora Posted November 16, 2021 Author Share Posted November 16, 2021 I tried to upload a new version but gave up after maybe 50 tries 😞 Always getting this server error -200. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted November 16, 2021 Share Posted November 16, 2021 Did you make sure the new upload does not exceed your attachment quota? You can delete old attachments here: https://forums.getpaint.net/attachments/ Select the items to delete on the far right, and then it will give an option for deletion. 1 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
midora Posted November 16, 2021 Author Share Posted November 16, 2021 I deleted the old file, saved the edit, edited it again and the dialog told me that there are 565kb left. The upload file is just 45kb (because I splitted the upload in plugin and examples). There are days the upload or just writing topics takes several tries. It's just this forum for me. It doesn't depend on the browser (Firefox, Edge or Chrome). Quote Link to comment Share on other sites More sharing options...
midora Posted November 17, 2021 Author Share Posted November 17, 2021 No ithe upload worked after the fifth try. Maybe some timeout on the server is to short. Quote Link to comment Share on other sites More sharing options...
midora Posted November 17, 2021 Author Share Posted November 17, 2021 Release v1.5 (16.11.2021) - Fixed a bug regarding the offset of sub frames (introduced in 0.13.2) - Added simple preview Moved the examples to a separate zip. 1 1 1 Quote Link to comment Share on other sites More sharing options...
Pixey Posted November 17, 2021 Share Posted November 17, 2021 On 11/6/2021 at 1:50 PM, midora said: (be warned the installation of this shell extension is not easy 😉) That's very, very true 😲 I'd like some clarification please. 1. Does one make a folder in this location? C:\Windows\Microsoft.NET\Framework64\v4.0.30319 I made a new folder in there and called it 'Thumbnail'. 2. I then copied the location and added it to the code you gave: cd {Thumbnail} {regasm folder}\RegAsm.exe /codebase abc.Thumbnail.dll 3. I then tried, in Admin mode/command, to do the rest, but it doesn't work Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
midora Posted November 17, 2021 Author Share Posted November 17, 2021 You should place the folder somewhere in the user space, not on a removable disk and not in a system folder with admin rights. What's the output of the regasm tool? Anyway I will create a small application to install/uninstall these thumbnail files (in the moment there are already 12 on my side) in a proposed location. Shouldn't be to complex. But I like to close the implementation of the apng format first. The save part of apng is now promised for some years and still not available. I would also prefer that the normal gif, png, webp thumbnails should show an indication if they are containing an animation. Id did this for bmp containing this bmrl format. I will do the installer before I'm looking to improve the speed creating the frames of animations. There are some parts of the implementation where multiple tasks are possible. And the code can be used in all implementations. Trying to save your aquarium takes much too long an my pc. Quote Link to comment Share on other sites More sharing options...
BajaBrainBlast Posted November 18, 2021 Share Posted November 18, 2021 this plugin looks great, but im having issues with it. i had a fresh install of paintnet, and keep getting this plugin error: Spoiler D:\Program Files\PaintNet\FileTypes\ImAGIF.FileType.dll, version 1.5.0.0 System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. File name: 'System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. i tried to fix the HKLM error on my own, but i hope it's unrelated because i failed haha Quote Link to comment Share on other sites More sharing options...
midora Posted November 18, 2021 Author Share Posted November 18, 2021 Hi @BajaBrainBlast did you install paint.net 4.3.2? Anyway you should avoid to fix issues in registry as long as you have not a quite good idea what you are doing. Quote Link to comment Share on other sites More sharing options...
midora Posted November 18, 2021 Author Share Posted November 18, 2021 OK I needed a break and used it to do the thumbnail installer. Hope it's easier now (and works as expected ,-) ) Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 18, 2021 Share Posted November 18, 2021 @midora Any plans to fix Color Harmonies? Quote Link to comment Share on other sites More sharing options...
midora Posted November 18, 2021 Author Share Posted November 18, 2021 Color Harmonies works for me in 4.3.3 and 4.3.3 (if the OptionBasedLibrary files are in the Effects folder). The development of OptionBasedLibrary is halted in the moment until I get a better idea how to fulfill the new rules in an optimized way. So I'm updating PropertyBased file types in my spare time. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 18, 2021 Share Posted November 18, 2021 I see it works, just the options to load and save are non-functional. The only reason I posted here is because I cannot post to the Color Harmonies thread. Today, Style Transfer is in a frozen state as well. Quote Link to comment Share on other sites More sharing options...
Rle Posted November 19, 2021 Share Posted November 19, 2021 @midora see here : Quote Link to comment Share on other sites More sharing options...
midora Posted November 20, 2021 Author Share Posted November 20, 2021 I'm looking for an ImAGIF.FileType dll version <= 0.12. You may know that I lost access to all my sources in 2015. When I became active again on this forum (beginning of 2021) there was just a modified version available which used already octree to quantize colors (my versions used the old built-in quantizer of paint.net). There are issues with all these octree versions and I would like to compare the output of v1.5 with an older version of the plugin. I.e loading Pixeys Aquarium sig (5,8 MB) and resaving creates a 19 MB file with v1.50. I already fixed some issues and could reduce the output to 10 MB and I have an idea what's going on. But it would be easier to first compare it with the old implementation. So if someone has an older dll archived and could provide it to me then I could recompile it and check for differences. Quote 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.