freezy / dmd-extensions

A toolbox for virtual pinball dot matrix displays.
GNU General Public License v2.0
126 stars 54 forks source link

Faded brightness when displaying certain GIFs #94

Closed IainS1986 closed 6 years ago

IainS1986 commented 6 years ago

This is using a PinDMDv3.

I'm displaying a plain white animated GIF to the display. Some of the GIFs though appear to display "dimmed" in the top right hand corner compared to the bottom left.

I've been trying to determine why some GIFs are displaying fine (full brightness across the DMD) and some are all consistently full brightness in the bottom left, and 0 brightness in the top right, which the dots seemingly normalised brightness from bottom left to top right.

Outside of this, most of the GIFs and all videos, VPinMame and FX3 are all displaying at full brightness so it doesn't seem to be a hardware issue.

I'll just hop on my cabinet and get a GIF that works and one that appears faded

IainS1986 commented 6 years ago

afm_1 2 0 ac-dc_luci-1 4

So, ACDC one displays fine across the board. Attack From mars is brighter in the bottom left and darker/off in the top right.

I tried to play them to double check with "dmdext play -f AC-DC_LUCI-1.gif" but keep getting "InvalidOperationExceptions" with "The calling thread cannot access this object because a different thread owns it". But I can view the GIFs when using PinupPopper.

IainS1986 commented 6 years ago

img_20180427_162125002 Hopefully these photos help show what I mean. ACDC is fully bright, but the AFM fades so much it disappears in the top right.

IainS1986 commented 6 years ago

img_20180427_162136772 AFM

freezy commented 6 years ago

Well first thing that comes to my mind is that dmdext resizes the input image to the output's destination, so if you feed it a 256x64 GIF like yours then it'll be resized to 128x32 and there will be aliasing. So if you want pixel-perfect animations, use a 128x32 GIF.

You can capture original-sized videos using DmdDevice.dll with VPM and enabling the [video] option. I think you should be able to create GIFs when providing a file with the .gif extension.

IainS1986 commented 6 years ago

I'll retry with 128x32 but I think i actually had that before and saw the same thing....i'll double check

I'm using ffmpeg to convert videos to gifs so maybe thats the issue too....although i'm doing it for all of them so the examples above were both gifs generated from videos with ffmpeg

freezy commented 6 years ago

Try resizing them in ffmpeg and if the result playing them on screen is the same as on the dmd then there you have it.

On Fri, Apr 27, 2018, 17:34 Iain notifications@github.com wrote:

I'll retry with 128x32 but I think i actually had that before and saw the same thing....i'll double check

I'm using ffmpeg to convert videos to gifs so maybe thats the issue too....although i'm doing it for all of them so the examples above were both gifs generated from videos with ffmpeg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/freezy/dmd-extensions/issues/94#issuecomment-385007202, or mute the thread https://github.com/notifications/unsubscribe-auth/AAETGrpw0n6cOMXC7P3H2KQuhGr_emdMks5tszqBgaJpZM4TqjAw .

IainS1986 commented 6 years ago

Actually, yeah my bad I think thats it. Resized to 128x32 and the brightness is fine across the device. Good to know, would never have expected that effect from bad aliasing on the resize (also, not 100% sure why only some show the effect...i think the ones with more "detail" are effected)

freezy commented 6 years ago

As far as I know there are already properly sized gifs for most games on the gameex ftp.

On Fri, Apr 27, 2018, 17:38 Iain notifications@github.com wrote:

Actually, yeah my bad I think thats it. Resized to 128x32 and the brightness is fine across the device. Good to know, would never have expected that effect from bad aliasing on the resize (also, not 100% sure why only some show the effect...i think the ones with more "detail" are effected)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/freezy/dmd-extensions/issues/94#issuecomment-385008284, or mute the thread https://github.com/notifications/unsubscribe-auth/AAETGrUlhv4CuawK4mCyHCs_s_MuRevQks5tsztkgaJpZM4TqjAw .

IainS1986 commented 6 years ago

I'll go check, cheers. All good though, definitely a resize issue (think some of my source videos aren't ideal either). Cheers, i'll close this now.