Jump to content

'GIF Animations and Images' FileType Plugin (.GIF, .AGIF) [Latest v1.5 2021-11-16]


midora
 Share

Recommended Posts

There is an additional info which people should know.

 

If the first frame of a gif is surrounded by a transparent area and you are loading it into paint.net without changing the name to .agif then you will get the first frame without the transparent area (means the image dimensions are smaller).

 

The reason seems to be an issue in the WIC (Windows Imaging Component) which is used from paint.net and the WindowsExplorer. WIC returns the dimensions of the first frame and not the logical screen size. Difficult to say if this is a bug or a feature. The Windows Explorer thumbnail also removes the transparent area and shows the smaller dimensions in the tooltip. I never reported it to Rick. A typical example is the deen gif which I posted earlier.

midoras signature.gif

Link to comment
Share on other sites

@midora Maybe I uploaded the wrong one but I tried again and getting the same results.

I did suspect it had something to do with the "unused" transparent background.

I thought it might be the tooltip only but when opening again in paint.net I get smaller dimensions.

 

This is the process(sorry for a lot of screenshots):

 - Original file:

  image.png.ef656261e3d173a450248f12fc8d8a3c.png

Saving:

image.png.56e75218111aaad448fbe0c459810c49.png

Result:

image.png.6ffd7936c29dae0486727feefe3f4feb.png

 

I hope this clarifies it.

 

Thanks,

Tom.

Link to comment
Share on other sites

I tried to explain that this is a WIC issue. If you rename the file to .agif and open it in paint.net the size of the canvas will be 112x112. Every browser will play the file with a size of 112x112.

 

I guess the only chance to avoid this issue in Windows Explorer would be to add a save option which tells the plugin that the first frame should not be optimized to the minimal size. This may increase the file size a little bit but not a lot.

 

midoras signature.gif

Link to comment
Share on other sites

I'm really surprised. Roughly 1000 downloads in a month. Looks like that people still like to create gifs.

Working on apng in the moment and because agif and apng are sharing part of the code there will be also an update for agif (better compression in some cases, improved commands and preview).

Share their creations. 🙂

  • Like 1

midoras signature.gif

Link to comment
Share on other sites

11 minutes ago, midora said:

m really surprised. Roughly 1000 downloads in a month

 

I wish too, that people would share their results :)

30b8T8B.gif

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

Doing AWEBP save, I stumbled upon an issue with the number of cycles in AGIF. Setting cycles to n (n> 0) shows the animation n-times in MS Photos but all browsers i checked (Firefox, Chrome, IE, Edge) show the animation (n+1)-times. So it is not possible to show the animation just one-time. I found some old discussions about this issue in the browsers and why they are all using now n+1. Maybe MS should change MS Photos because browsers are more important nowadays.

 

Because most people will use cycles=0 (infinite) I will not provide an emergency update 😉

BTW: googles gif2webp adds also 1 to the gif loop count to set the loop count of the webp. Means that the gif and the converted webp will show the same number of cycles in a browser (but not in MS Photos).

midoras signature.gif

Link to comment
Share on other sites

Hello!

 

I am fairly positive I have followed the downloading and file locations correctly but cant seem to get the agif to show up on my file type when trying to open a file. Any assistance available? 

 

edit: I just realized im running 4.2.12 going to upgrade the software and see if this fixes my issue.

 

edit, edit: Yup issue resolved. I should have known better 😅

 

 

 

Edited by SourDoggie
Link to comment
Share on other sites

  • 3 months later...

Hi, I'm getting the error message below for many (but not all) of the gifs I'm trying to open using this plugin. The gifs all come from the same creator and there's no distinction I can see between the ones that work and the ones that don't. I've changed the file extensions for all of them to .agif. I'm using the latest version of paint.net and just downloaded the plugin today, so it's up to date also.

 

Exception:

System.Exception: File does not contain a GIF signature
   at PropertyBasedFileTypes.ImAgifFileType.OnLoad(Stream input)
   at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src_4_3_x\Data\FileType.cs:line 507
   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src_4_3_x\Base\Functional\Func.cs:line 166
 

Any idea how I get around this? Thanks!

Edited by dvc4
Link to comment
Share on other sites

When you add the .agif to the gif file, do you change the second choice, Save As type (seen here in a video I made) to All Files - as seen here at the beginning of the video.

 

https://www.youtube.com/watch?v=o8M9jng41UA&t=35s&ab_channel=NanetteAlsop

 

 

 

30b8T8B.gif

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

Thank you both for such quick replies!

 

I used the What's It? tool and it turns out even though they downloaded as .gif they're actually .webp files. I'm assuming there's no way to make those work with this plugin?

Link to comment
Share on other sites

6 minutes ago, dvc4 said:

I'm assuming there's no way to make those work with this plugin?

 

No, GIF and WebP are different formats.

There is an Animated WebP plugin: https://forums.getpaint.net/topic/119134-webp-animations-and-images-filetype-plugin

  • You're a Smart Cookie! 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 should've searched before I asked. Thank you!

 

This is probably the most responsive forum I've ever used, thank you all for your help + for continuing to create/support all these plugins.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

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.

 Share

×
×
  • Create New...