3 ms·
I had an app that needed to take snapshots of web pages, and the client was very picky about the image quality. OSX exposes WebKit in such a way that I could ge
by sailormoon 17y ago
I had an app that needed to take snapshots of web pages, and the client was very picky about the image quality. OSX exposes WebKit in such a way that I could get very nice snapshots, and I could never get anything close on Linux so a mac was the tool of choice. It sat there doing absolutely nothing besides running a web service that would occasionally take a pic of a web page and hand it back to the real linux server, and it did that fine for a long time.
I think the main issue I had was with software update. Apple provides an interactive command line interface to their update program so you could write some scripts to do it but in practise I just did it manually every once in a while. A couple of times it didn't reboot cleanly and got stuck on a firmware update or something so a manual power cycle was in order.
I also had a couple of weird problems where the machine would become unresponsive if it hadn't been rebooted for a long time. Never really got to the bottom of that but it would be something to consider if you were going to use them "seriously".
- vog 17y agoWebKit is part of Qt and thus available for any platform. Or did I miss something?
- blasdel 17y agoThe Qt version (and Chrome's version) uses the platform to do the font rendering, which on everything but OS X and Windows would be freetype. If the client wanted Apple's particular font rendering, they'd have to use their version of Webkit. The least-shitty way to do that is to write a Webkit app for OS X (there's also the Windows version of Safari, but that would involve a lot of bullshit)
- sailormoon 17y agoYep, that's exactly it. Didn't even have to write an app - I used this excellent tool: http://www.paulhammond.org/webkit2png/ http://www.paulhammond.org/webkit2png/
- sailormoon 17y agoUndoubtedly it was I who missed something! It just came down to "well, I have a working script right here for mac, or I can spend the next days/weeks/maybe never trying to get it working and looking nice on linux". I guess people don't hear "we went with the mac to save money" too often but in this case, that's what it was. But even so - I generally don't much like linux's font rendering. Doing it on mac meant that the images looked beautiful, basically exactly like Safari, which was to the client's (and my) taste.
- petercooper 17y agoI'm probably going to rig up a colocated Mac Mini to do exactly the same thing. I asked around on Twitter if other people were interested in chipping in to share the service and people were keen. There's a business opportunity here. The existing screenshot services are mostly slow (I want my imgs within a minute, ideally - not 10+), hideous quality or use browsers on operating systems with shoddy rendering. As it is, I think I can max out a Mac Mini to producing around 500-700k screenshots a day and lease a Mac Mini with the required hosting for ~$130 a month, so the costs divide down quite nicely.
- sailormoon 17y agoThere's a business opportunity here. You reckon? I have to admit I didn't even think of that. I wouldn't have thought people would pay for screenshots, but then again I didn't think people would pay to send emails, either. This was part of a value added service, sadly it never really got off the ground. Shall I send you an email telling you more about what was envisaged? Maybe we can cooperate.