Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageWriter: upside down image when colorspace is Y8. #58

Closed
Reel-Deal opened this issue Mar 29, 2015 · 2 comments
Closed

ImageWriter: upside down image when colorspace is Y8. #58

Reel-Deal opened this issue Mar 29, 2015 · 2 comments

Comments

@Reel-Deal
Copy link
Member

ImageWriter: upside down image when colorspace is Y8. FlipVertical() before ImageWriter fixes the problem.

Test script:

BlankClip(length=1, width=512, height=256, pixel_type="Y8", color_yuv=$808080)
Subtitle("Test", size=128, align=5)
ImageWriter(file="C:\", type="png")
  • Using the following types writes an upside down image: bmp, bw, dds, jpg, png. pbm, pgm, ppm, rgb, rgba, sgi, and tga.
  • I tried with ebmp and tif/tiff, even though it writes the file I cannot open them, maybe they don't support Y8?
  • file="pal" - ImageWriter: error 'illegal operation' in DevIL library - writting file "c:\000000.pal" - DevIL version 0.
  • file="pcx" - it just returns a black frame.
  • file="raw" - works correctly.
  • I viewed images in GIMP and Photoshop.
@qyot27
Copy link
Member

qyot27 commented Mar 29, 2015

Well, you're crossing the RGB threshold, even if implicitly on write (because standalone image formats that support non-RGB are rarer, or when they do, the tools to read/write them may be scarce), and RGB formats requiring vertical flipping is a common thing. You'll notice that 2.6 RC1 also exhibits this behavior.

EBMP is an AviSynth-specific extension; GIMP and Photoshop are what don't support it, rather than it having issues with Y8. You have to use ImageSource() for EBMP files.

You could always just write the image(s) with ffmpeg:

ffmpeg -i test.avs output.png

Although the selection of output image formats is probably not as diverse. But outputting to png and then using ImageMagick is an option for exotic formats (or use ImmaAvs).

@Reel-Deal
Copy link
Member Author

Never noticed this was actually fixed. Thanks pinterf.

Fix in eb6f264 and 6fa9348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants