Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
21st April 2021, 22:22 | #1 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
ImageSource problem with Targa files - unedited ones flipped, edited ones unflipped
I used VirtualDub to export an image sequence of Targa (.tga) files. I then edited some of them in Photoshop.
When I use AviSynth and ImageSource to load the sequence, the edited ones are fine but the unedited are vertically flipped. Anyone know what's up with that, and if there's a way around it? Here are two of the images - one flips, one doesn't: https://horman.net/flips.zip |
21st April 2021, 23:14 | #2 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
flipvertical() ?
I used colorbars().trim(0,-1) to test, and targa uncompressed export vdub classic 1.10.4 x86 - NOT flipped vdub classic 1.10.5 x64 - NOT flipped vdub2 - flipped So something with vdub2 branch targa exports |
21st April 2021, 23:38 | #3 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
The problem is that it's selective. The Targas I've edited have the opposite "flippage" to the ones that are unedited.
It suggests to me that there is some kind of flag in the Targa that Photoshop is honouring (and removing by "applying" the flip during editing), but ImageSource isn't. If you open the linked images above in Photoshop, both look normal. With ImageSource, one is flipped and one isn't. |
21st April 2021, 23:50 | #4 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
But photoshop "fixes" it when decoding, and it writes out a proper tga.
vdub2 tga ok in libavcodec based - ffmpeg, ffvideosource, lsmash (ie. not flipped) . Imagemagick in vapoursynth ok Gimp doesn't even display the vdub2 tga . It opens, but it's "transparent" . vdub1 tga's are ok in gimp djv_view doesn't open the vdub2 tga either (black screen), but vdub classic tga ok Something up with vdub2 tga's if gimp can't open it properly - I don't think it's specifically limited to an avs/imagesource problem Last edited by poisondeathray; 22nd April 2021 at 00:05. |
22nd April 2021, 04:58 | #5 | Link | |
Registered User
Join Date: Sep 2005
Posts: 130
|
There's similar event reported of general tga being flipped here. It said"
Quote:
Last edited by patul; 22nd April 2021 at 08:28. Reason: remove stupid & unrelated rumbling. |
|
27th April 2021, 16:52 | #7 | Link |
Registered User
Join Date: Mar 2015
Posts: 775
|
It seems I introduced some fixes at the same time as added alpha channel support. The header written by VD2 seem correct, don't know whats wrong with Gimp etc. I use tga 'all my life' and the upside-down flags are first thing to learn about it...
__________________
VirtualDub2 |
27th April 2021, 18:23 | #8 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
ffmpeg seems to support it ok, but ffplay has issues similar to gimp
ffplay -i vdub2.tga => output is "black" screen, like gimp and djv ffplay -i vdub.tga => output is ok For mpv, vdub2.tga is "checkerboard" , indicating transparency for mpv, vdub.tga is ok The "flip" might be related to alpha channel introduction, or might be separate issue Last edited by poisondeathray; 27th April 2021 at 18:26. |
27th April 2021, 20:09 | #9 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
The transparency /alpha channel is not an issue; it was just a "bad" test input on my part
My original test input was colorbars(), but the alpha channel for RGB32 is with RGB 0,0,0 in the alpha plane If you check in avisynth ffvideosource() showalpha() vdub.tga shows 255,255,255 vdub2.tga shows 0,0,0 This is the expected output, since the input was actually a 0,0,0 alpha channel - so it should be "transparent" It's unrelated to the "flip" issue w_m reported - in both RGB24 or RGB32 cases the vdub2 tga output is still flipped with imagesource; vdub tga output not flipped Gimp is ok with RGB24 from vdub or vdub2 (not flipped, returns expected output) Last edited by poisondeathray; 27th April 2021 at 20:12. |
Thread Tools | Search this Thread |
Display Modes | |
|
|