Shotcut opening wrong (possibly faulty) png file even after renaiming

Dear Shotcut team,

First of, I am not exactly sure if this is a bug related to Shotcut, GIMP, png or my stupidity.
But I seem to have a really strange problem with Shotcut. I have got two images, both created from one original image(full_orig_image.png), both split in half using GIMP, exported as png.

Download link for the original images is below, as i could only put one image here, and the forum would also convert it to jpeg with lower resolution.

When i open any of these images in some image viewing program like the windows fotos app,
it looks perfectly normal. The full image consists of both halfs, the left image has the right half as alpha and the right image has the left half as alpha. Now when i open the left half in Shotcut, it is just fine, exept for the fact that it changes the alpha to white but thats normal i guess.
Now when i open the right image, in stead of showing the right image in the Shotcut source preview, it shows the full image with both halfs, that is also the true when i drag it to the timeline.

I have tried to redo the cut images multiple times, resulting in the same problem. It is also 100% repeatable. It also seems as if the location and filename don’t influence the “bug”. I have noticed that the faulty image has aproximately double the size of the working one, so maybe it’s a problem with the file, but i don’t understand why it looks normal in other programms then.

It’s really strange and I don’t understand how it can happen, but i hope someone can solve the problem, or even knows what is causing it or what I am doing wrong.

Thank you in advance for all replies,
MrElektron

Some additional information:
Shotcut “mode”: 1080p 30fps

Original image resolution:
1920x1080
(dropbox share link to original files: https://www.dropbox.com/sh/lfw3gpmcpqijemg/AADdm91MgrIYfKbzmXYwLrG5a?dl=0)

Operating System: Windows 10 Pro 1903 64bit

GIMP Version: 2.10.18, not quite the latest version but not to old

Shotcut Version: 20.10.31, i have just updated it today,the problem also occurred in older versions like 20.04.?? which i was using before.

1 Like

There’s nothing wrong with the images.
Left half in the viewer.


Right half in the viewer.

Both halves display properly on the timeline as well.

6 Likes

Same here. Either I do not understand or am unable to reproduce the problem.

Your images are fine.
I can confirm the bug.
Possibly only related to 1080p 30FPS video mode preset.
Shotcut 20.10.31, Windows 10 Home
Video Mode 1080p, 30fps


metals.mlt (5.1 KB)

Video Mode 720p 60fps, works fine.


metals 720p.mlt (5.1 KB)

OK, thanks, I reproduced it now. For me the problem goes away when I place the pictures on an upper video track with something underneath.

1080p, 60fps

[Debug  ] <TimelineDock::dragEnterEvent> true 
[Debug  ] <Timeline::OverwriteCommand::redo> trackIndex 0 position 0 
[Debug  ] <Player::setIn> in -1 out 239 
[Debug  ] <Player::setOut> in -1 out -1 
[Debug  ] <TimelineDock::setSelection> Changing selection to (QPoint(0,0))  trackIndex -1 isMultitrack false 
[Debug  ] <Timeline::AddTrackCommand::redo> video 
[Debug  ] <TimelineDock::setSelection> Changing selection to (QPoint(0,1))  trackIndex -1 isMultitrack false 
[Debug  ] <Timeline::AddTrackCommand::redo> video 
[Debug  ] <TimelineDock::setSelection> Changing selection to (QPoint(0,2))  trackIndex -1 isMultitrack false 
[Debug  ] <MainWindow::open> "D:/Shotcut_Projects/Bugs File/metal slide/left_orig_image.png" 
[Debug  ] <MltXmlChecker::check> begin 
[Debug  ] <MltXmlChecker::check> end 
[Debug  ] <Mlt::Controller::setPreviewScale> 1920 x 1080 
[Debug  ] <MainWindow::setAudioChannels> 2 
[Debug  ] <Mlt::Controller::setAudioChannels> 2 
[Info   ] <MainWindow::open> "D:/Shotcut_Projects/Bugs File/metal slide/left_orig_image.png" 
[Debug  ] <TimelineDock::setSelection> Changing selection to ()  trackIndex -1 isMultitrack true 
[Debug  ] <autosaveTask> Function autosaveTask finished in 16 ms.

The bug has been there for a long time. I confirmed on versions as far back as 18.01.
Another workaround is to add some filter, not any, but Crop: Rectangle or Size, Position & Rotate worked for me.

Well thank you all for your help,
I think I can live with it to use 1080p 60 for this video as it is only going to be a one time render, then I can just use the rendered file. Unfortunately I can not use a crop filter, as the exact size is important for the animation I want to make. But I have one more question, if this bug was in shortcut so long, what exactly is causing it? How can it be that shortcut always opens a special wrong file, even when I redo the image, rename it or move it? Does this issue also occur with other images, if yes, what is special to those images that causes the bug to happen?

I do not think it is reading the wrong file, and there is some other problem. You can use the crop rectangle filter withOUT cropping anything.

I re-exported your images as PNG using GIMP 2.10.20 and the problem went away for me.

rexported.zip (2.6 MB)

Using a tool called ImageMagick identify I was able to print detailed information about each one. One suspicious difference is:
Before - Alpha: srgba(248,248,248,0) #F8F8F800
After - Alpha: none #00000000

And I reproduced it when using GIMP PNG Export option “Save color values from transparent pixels”
It is documented here. Here is a related discussion. It seems GIMP changed the default for this option to false because it was causing problems with user expectation.

Shotcut does not display an image with an alpha channel over the top of a checkerboard pattern that you might be used to seeing. Checkerboard pattern is merely a convention, and it requires the extra work of compositing in order to show like that. We have a video filter Alpha Channel: View if you want to see it like that.

There is no direct way to view an alpha channel. So, what Shotcut is doing is correct: it is simply showing you the RGB channels of your image. Your right_orig_image does have the full image in it. It just so happens to also have an alpha channel that hides a portion of it. I wrote before the problem goes away when you put the image on an upper video track with something underneath it. When Shotcut composites that it discards the unseen portion of that image and replaces it with whatever is underneath.

Well thank you very much for investigating the image again, in the end i just solved the problem by applying the crop filter since i had to animate the images anyway, and i also changed the video mode to 1080p 60fps so the siliding animation would look smother. Anyway it is really interresting and good to know that GIMP can hide rgb values behind alpha without me knowing, i guess i have done something differently with the left image. I greatly appriciate your help and i hope i can work around this issue next time,

MrElektron

I used your images without applying any crop filter to them.

https://streamable.com/nx9sab

But there is a crop filter there, as you have keyframed the position there automatically is a crop filter right?

No crop filter used.
shotcut_2020-11-08_17-07-48 shotcut_2020-11-08_17-08-09
metal slide.mlt (8.3 KB)

The it also works with the size position and rotate filter plus you have another image in the background that it can render where the alpha layer is, so it does not have to render the pixel data and you are also using 60 FPS which for some reason doesn’t have this bug

60 fps has nothing to do with it, and it is not a bug as I already explained.