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

Generate screenshot thumbnails for html file #2737

Closed
fastlanebot opened this issue Nov 17, 2014 · 12 comments
Closed

Generate screenshot thumbnails for html file #2737

fastlanebot opened this issue Nov 17, 2014 · 12 comments

Comments

@fastlanebot
Copy link

Original issue by @vytis - Imported from fastlane/snapshot#13

The project I am using snapshot for at the moment supports 13 languages. Even taking only 10 screenshots for each language produces around 150mb worth of screenshots.
Safari seems to be having trouble when displaying the generated html file. It is still usable, but barely. Not sure what will happen when I will add the new iPhones and the iPad to the list of devices though...

@fastlanebot
Copy link
Author

@KrauseFx commented

Nice! So creating those screenshots is working perfectly? 👍

Well, snapshot could compress the images, but I guess, the would even increase the size (since you also need the original screenshots).

What do you propose?

@fastlanebot
Copy link
Author

@vytis commented

From all the tools I have found snapshot is the only one that works without problems with Xcode 6. Tried bwoken, Subliminal, KIF and few random scripts with no luck. Good job!

It does sometimes spit out an error, but re-running helps. Not sure if it's because instruments is buggy, some problems with my automator script or snapshot itself.

I think the best thing would be to create thumbnails for all images and use them in screenshots.html instead of full-size ones.

I guess there would need to be a separate folder for thumbnails as well, so that they wouldn't mix up with original screenshots.

@fastlanebot
Copy link
Author

@KrauseFx commented

Thanks! Yes, I've been struggling with the other tools as well. That's why I developed snapshot.

What error does it sometimes show?

Creating thumbnails in a subfolder is a good and easy idea. I'll implement this later today. Thanks for your feedback 👍

@fastlanebot
Copy link
Author

@KrauseFx commented

Okay, I just implemented this.

I'm not sure which way is the best:

  • Instead of ./screenshots, the thumbnails are stored in ./thumbnails, which will result in polluting the folder
  • Inside ./screenshots there will be 2 subfolders, thumbnails and originals, which is also not perfect
  • Create the thumbnails in the same folder ./screenshots/de-US/xy.png, just with the name ./screenshots/de-US/xy_thumbnail.png to easily filter it.

I currently implemented the last solution, but I'm not 100% happy with it. What do you think?

@fastlanebot
Copy link
Author

@KrauseFx commented

Ha, just got an idea: Use Base64 encoded images in the HTML. Advantage: You can send the HTML file to someone.

When you click on an image, it will open the original image in the browser.

Alternative: We could generate a PDF file, just like Deliver does.

@fastlanebot
Copy link
Author

@vytis commented

Maybe it would be good to have some sort of release directory that would contain all things generated. Not sure if there is a plan of letting people customise the template that generates screenshots.html.

On the other hand producing a PDF would solve these problems, but maybe it's not a very 'lightweight' solution.

@fastlanebot
Copy link
Author

@postmechanical commented

Paths to screenshots in the html file should also be relative. As it is, you cannot zip up the output and move it around or share it with others without first removing the local absolute image paths from screenshots.html.

@fastlanebot
Copy link
Author

@KrauseFx commented

@postmechanical This is not related to this issue, is it? snapshot does not create thumbnails right now.

@fastlanebot
Copy link
Author

@postmechanical commented

@KrauseFx No, I can create a new issue for it if you want.

@fastlanebot
Copy link
Author

@KrauseFx commented

@postmechanical Yes, that would be great! 👍
In the mean time you can always use CMD + P to store the report in a PDF file.

@fastlanebot
Copy link
Author

@powtac commented

sips can be used with a quality parameter. I'm wondering if the second highest quality param would reduce the file size dramatically.

@fastlanebot
Copy link
Author

@KrauseFx commented

Yes, but this would result in storing the screenshots multiple times. I'll close this issue for now.

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

No branches or pull requests

1 participant