midora

Animated Images

Recommended Posts

Evidently 4.0.6 broke it, as I'm getting this error after following the installation instructions very carefully, and the readme only specifies support for 4.0.5. I get this error when trying to import a .AGIF file.

 

System.OverflowException: Arithmetic operation resulted in an overflow.
 
   at FileFormats.FileFormatGIF.GifReadExtBlock(Stream stream)
 
   at FileFormats.FileFormatGIF.GifReadBlocks(Stream stream)
 
   at FileFormats.FileFormatGIF.LoadFromStream(Stream stream, List`1& frames)
 
   at PropertyBasedFileTypes.AgifInternal.Load(Stream input)
 
   at PaintDotNet.FileType.Load(Stream input) in d:\src\pdn\paintdotnet\src\Data\FileType.cs:line 496
 
   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in d:\src\pdn\paintdotnet\src\Base\Functional\Func.cs:line 158

Share this post


Link to post
Share on other sites

This exception should not depend on the paint.net version.

I would expect that there is a data block in the gif which is broken or will be misinterpreted.

Would need the gif to debug the reason.

 

You may check if the LookAtIt plugin (link at the beginning of this thread) is able to play the gif.

 

Or you may use DebugView from Mark Russinovich to catch the debug output of the module.

Edited by midora

Share this post


Link to post
Share on other sites

In my humble opinion, both plugins are equally impressive and useful in their current stages, and perhaps you tend to demand a lot from yourself. You can only do what you can Laie_98.gif

 

ImAGIF is OK but because the layer commands should be unique in ImAGIF, ImAPNG, and ImAWEBP I hold it off.

Peephole drawing was an UI experiment but at the end I was sure that I'm not able to get it feel good. So I switched to a different solution which works like in SpiritLevel plugin. This new variant is OK from the user experience (IMHO ;-) but has too many quirks. In development you always have to think about how a basic user w/ a limited experience could handle complex operations. The UI has to hide the complexity. The implemented algorithm is typically the easy part of development. Just a little bit math and data manipulation.

Share this post


Link to post
Share on other sites

This exception should not depend on the paint.net version.

I would expect that there is a data block in the gif which is broken or will be misinterpreted.

Would need the gif to debug the reason.

 

You may check if the LookAtIt plugin (link at the beginning of this thread) is able to play the gif.

 

Or you may use DebugView from Mark Russinovich to catch the debug output of the module.

LookAtIt cannot open it either with the generic error '(Arithmetic operation resulted in an overflow)'

The gif operates perfectly in standard .gif format, using internet explorer to view it has no issues. After changing it to .agif for us in paint.net however yields this issue.

 

Here is a link to the .gif in case it's of any help. 

https://dl.dropboxusercontent.com/u/227976328/RainbowDashChairGif.gif

  • Upvote 1

Share this post


Link to post
Share on other sites

This GIF contains an XMP Application Extensions which is broken.

XMP is a way to embed metadata into GIF proposed by Adobe.

ImAGIF and LookAtIt try to extract some informations from this metadata and fail because the XMP is not valid.

We will add more checks to skip corrupted XMPs.

Share this post


Link to post
Share on other sites

Update ImAGIF.FileType 0.12 (17.8.2015)
- Fix to handle GIFs containing corrupted XMP metadata
Update LookAtIt.Effect 0.6 (17.8.2015)
- Fix to handle GIFs containing corrupted XMP metadata

 

Thanks to Portalboy for reporting.

  • Upvote 1

Share this post


Link to post
Share on other sites

Been wanting to try this plugin for a long while but was busy with school and life and all. Anyway, I had to try it someday :)

 

Maximilian! I love your work. Beautiful. Thank you.

  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks for the fixes and updates, midora! LaieA_060.gif

(You keep doing a remarkable job, even when you don't always feel completely satisfied ;))

 

Maximilian! I love your work. Beautiful. Thank you.

 

Thanks, Seerose! Glad you liked it!Laie_98.gif

Share this post


Link to post
Share on other sites

Midora - I am having trouble opening gif's in PDN since I changed over to Windows 10.

 

If I'm not mistaken (and I've not tried to open a gif in PDN for some time) I used to save an animated gif image, then change it to .agif after which, when opened in PDN, all the layers would open up.  What am I doing wrong?

 

oSbTynj.png

 

Thanks in advance :) .

Share this post


Link to post
Share on other sites

Hi Pixey, I'm in fear that you used the default gif filetype to save the gif. Do you remember if you got an extended list of settings while saving?

If you are not sure about the gif open it in the browser or in the LookAtIt plugin.

Share this post


Link to post
Share on other sites

Hi Midora - sorry I didn't explain my problem clearly enough.  It's not about a gif I'm making, or made, that I want to play back in Lookatit.

 

I recall that I used to be able to download an animated gif from the internet, then rename it from .gif to .agif and then open it in PDN and all the layers that were used to make the gif would open up.  I used to do this to study how gifs were put together.

 

Hope this makes sense.  Anyway, I can't reproduce this again.

Share this post


Link to post
Share on other sites

OK in this case your steps are right. For sure you will just get the generated frames splitted to layers and not ny extra layers containing foreground, background or other effects.

Fine that the issue has gone.

Share this post


Link to post
Share on other sites

No, it has not been resolved.  After I change a .gif (rename it to .agif) then upload it into paint.net the individual layers do not open up.

 

I'm thinking this is something to do with Windows 10?

Zi20Blz.png

it doesn't even work if I choose .agif from a drop down.

50o2Hl0.png

Edited by Pixey

Share this post


Link to post
Share on other sites

Interesting.

I'm wondering why there is no extension in the filename box. What happens if you add .agif there and click open?

Is there a second file in this folder with the same name but the extension .gif?

Share this post


Link to post
Share on other sites

OK - tearing out my hair now :lol: .
 
I've tried every which way - to no avail.  It just won't open up into layers in paint.net.

dFcW0lT.png

and

Bxb4YRm.png

and

KpouhYR.png
 

Even if I choose the AGIF - Gif options in the drop down, no layers appear in paint.net.  Only the one image.

 

Share this post


Link to post
Share on other sites

Maybe something has changed in 4.0.6 and there is a problem now because the plugin allows the extension .gif in addition which may force the internal logic of paint.net to use the built-in gif loader instead of taking the selected one or the one assigned to .agif.

I could create a test version which removes the .gif from the extension list of the plugin.

I really hope that there is no issue with Win10 because I will not update any of my computers.

Share this post


Link to post
Share on other sites

Great - I was beginning to think I was losing my marbles and that it was me? 

 

My main computer is still en route to me here in Florida (which I have not yet changed to Windows 10) so once it arrives I will be able to see if everything still works the same way in Windows 7.  I can't remember whether I'd updated to 4.0.6 on it tho'    -  but I think I did.

 

Thanks for looking into this :D .

Share this post


Link to post
Share on other sites

Sorry for the off-topic, but I have to warn you:

Check first if windows 10 doesn't cause troubles for your model before upgrading. Anyone I know who upgraded had to re-install a good part of the drivers, on one PC windows 10 caused a blue screen every 10-20 seconds and we had to downgrade to windows 8 to make it useable again. It is probably better to wait for the first service pack before upgrading.

Often the behaviour is strange and the problems (sound or networking no longer working, bluescreens) only start a few days after the upgrade and not straight away.

Edited by ArgusMagnus

Share this post


Link to post
Share on other sites

Hello ............ thanks for that @Midora :)

 

But, I have now worked out that it is NOT Windows 10 - but it seems to be v 4.0.6 :( .

 

It works just fine in 3.5.11 (I've managed to download a copy to play with) and it works as it should, opening up all the layers in PDN.

 

i.e. save the gif - alter the File name (add to it .agif) before you save it, and, Save as: All files.  It turns the gif into a transparent img with the appended .agif - as seen in Example 1.

 

It doesn't work at all in v 4.0.6 ............ no matter what I try.

 

I will attach some examples for you here, so you can see what I mean.  I hope they make sense.

 

th_in%20v%203.5%20PB_zps3jgcedvt.png

 

 

 

Thanks so much for all your help.  Please don't lose sleep and work on it just for me, as I am happy to switch over to 3.5.11 when I want to study a gif example of all the layers.

 

th_opening%20a%20giff%20in%20v%204.0.6_z

 

 

 

 

Edited by Pixey

Share this post


Link to post
Share on other sites

That's funny, it works perfectly well here in PDN 4.0.6 on Win8.1 x64. All layers are intact with full transparency and so on when opened after renaming to .agif..... 

Share this post


Link to post
Share on other sites

Sorry for the double post ............. but, it's working now in v 4.0.6 :D .

 

I had to (because of playing with v 3.5.11) reload 4.0.6 again and then had to re-update the plugins!  Something did the trick.

 

cloud9.gif    

 

I do have another question though - can I get two things to move at the same time?

 

I am making an animated image and want a small part of the background to move, as another (different) part moves too!  I expect I need to use the Sprite for this?

 

Thanks for all of your help and sorry to have been such a pain :/ .

Share this post


Link to post
Share on other sites

Pixey no issue. Family, job, work for the community that's the typical order to do things for most of us.

 

Yes you may define as many sprites as you like and add them to a new frame of the animation using the 'draw' command. In the moment you can just set the position of a sprite but I like to add zoom and rotation parameters to the draw command.

 

Still this is not so easy to handle for a user because you have to calculate for each frame where to draw a sprite. Would be easier to tell in a frame take sprite NAME and animate it from a start offset to an end offset for the next 10 frames.

Share this post


Link to post
Share on other sites

Many thanks for all your help @Midora. It's much appreciated.  I didn't manage to get the water and the horse to move together.  Never mind.

 

I'm curious as to why the signature once animated is a little grainy?  Before animating it is much clearer:

 

before%20flatten%20and%20making%20gif_zp

My new signature ............. below :arrow-down:

Edited by Pixey
  • Upvote 9

Share this post


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