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

Exported screenshots are PNG and not JPG on Linux #25

Closed
hotice opened this issue Feb 10, 2017 · 2 comments
Closed

Exported screenshots are PNG and not JPG on Linux #25

hotice opened this issue Feb 10, 2017 · 2 comments
Labels

Comments

@hotice
Copy link

hotice commented Feb 10, 2017

On Linux, exporting a screenshot creates a file called ****.jpg, however, trying to open that with an image viewer file results in the following error:

Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)

After renaming the file from .JPG to .PNG, it works.

@mifi
Copy link
Owner

mifi commented Feb 10, 2017

That's odd. Maybe electron for linux doesn't ship with JPEG support. Can you confirm that it is a problem for all videos, not just one? Could you try one of these videos:
https://github.com/mifi/lossless-cut-fixtures

I guess we could check the actual response from toDataURL('image/jpg') and save a file according to the actual format.
however capture-frame doesn't allow this.

@mifi mifi added the bug label Feb 10, 2017
mifi added a commit that referenced this issue Feb 11, 2017
@mifi
Copy link
Owner

mifi commented Feb 11, 2017

Actually it turns out that all images are exported as png but with jpg extension. I can only assume that most photo viewers don't care about the extension (instead they use magic number to identify type). But the viewer you are using is using the file extension.

I have now updated code to export jpg as intended. The method can now also easily support other formats in the future.

aee96f3

@mifi mifi closed this as completed Feb 11, 2017
devwojtek pushed a commit to devwojtek/vidcut that referenced this issue Nov 24, 2018
blueshark0811 added a commit to blueshark0811/vidcut that referenced this issue Jun 21, 2019
devwojtek pushed a commit to devwojtek/vidcut that referenced this issue Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants