Preparing images for Google Slides (and other Google apps too)

User comes to tech, tech solves problem, world moves on. Yawn.

Some months ago, I helped with a project to help move someone’s large archive of digital photographs and clipart to Google Drive.  That was easy enough in itself – we just installed Google Drive on their Mac and just moved everything from the appropriate folder on their Mac to a suitable place on inside their Google Drive Folder, on a fast (100Mb synchronous) connection, and let time and Google Drive application do their work.  “Job done…”

Problem 1: Images are over 2MB. Okay, so we’ll shrink them…

…Eeeeeexcept they wanted to use the images immediately, as-is, in Google Slides and other Google apps.  The very first image dropped into their new presentation was too big.  It was either over 2MB, or over some arbitary pixel dimensions that the dialog box didn’t tell the user about.  So back the user came to our team asking what the heck was going on…

Looking at the relevant Google Support page for Docs Editors (as at 10th April 2015, and still not fully populated on 9th November 2015), one might think that just recompressing the images so they *just* squeeze under the 2MB size limit would be enough to comply.  And indeed on this info, given the ‘000’s of images affected, I sync’ed a copy of the affected Google Drive account to a spare Mac, installed Imagemagick (along with its numerous dependencies) and wrote us a bash-script.  Looking at the fileset, I noticed that only the JPGs were over 2MB in size, so I found I could simply tweak the script to look for any JPG over 2MB and use Imagemagick’s “convert” tool to resize the file in-place, then delete the old file to save confusion at the user end.  The basis of the conversion was this command:

convert image.jpg -define jpeg:extent=1970kb image.jpg.smaller

Sure, we sacrifice some overall quality due to JPG recompression, and the script needs to take care of some housekeeping along the way.  But having looked at a bunch of test-images side-by-side, we decided the work involved, and the results obtained were more than good enough for the intended use-case, and indeed any quality losses were barely detectable in >9 out of 10 cases even when pixel-peeping on a decent calibrated monitor.  So on we went with the live dataset after many test-cases, thinking the job was done.

So with the results looking good, off I went to tell the user that the file conversions were done, the results looking good and let us know of any problems.  Meanwhile we’ll move onto the next tasks on our creaking lists.

Problem 2: File size alone wasn’t the issue – pixel dimensions mattered too! D’oh!

Then the dreaded email pinged.  Our poor user had tried to insert the first of the newly recompressed images and sure enough, it had failed to load, and again the same generic helpless dialogue box appeared.  Not because it was a bad image itself – It’s a perfectly valid JPG, and looked very nice, despite the high pixel count and our fears over high compression rates and known multiple recompression steps.  These images are intended for end-use after all, not for further editing, and certainly not for anything other than on-screen use at low DPI output at long distance.

I had to confirm the issue for myself, dragging a JPG onto the insert image tool’s “upload from computer” window finally got the Google Slides image tool to tell me that the image was too big, and finally it gave me the actual limits I was supposed to be working to.

Great.  Now I need to go off and resize my images.  Again.

So, off I went to find a new copy of the original images in their original folders (you do still keep backups of what’s on your cloud storage, right?) Then I worked on a new script, that would resize the images to fit inside a 3500×2500 window, preserving aspect ratio, and would again work for GIF, JPG or PNG since those are all supported by Google Docs.  THEN I ran the same recompression script as before on any files that were still too big after downscaling.  Overall the process took much the same amount of time as the first run, but came with the advantage of the end-result overall looking much better up to the limits of the pixel dimensions and the file size.

Summing up

Some time on our end testing the full end-to-end process might have saved both us and the user some time and hassle, for sure, so my own lesson here is that some short-sightedness on our part for the sake of trying to “get back to other things” most certainly bit us all in the bum.  In our defence however, the process would have been *much* easier had the image dimensions, aspect ratio and file size limitations all been given up-front, NOT just at the point of the image throwing up an error, but also on ALL appropriate import screens, and in accompanying documentation we can search from outside the situation the users face. Another couple of lessons both for developers and support folk here! 🙂

Some thoughts on using Google Docs

Following on from yesterday’s thoughts on using a Chromebook for an extended period, I thought it worth updating it (coming soon!), as well as jotting down some thoughts about Google Docs.  This got so big (and is relevant to all platforms, not just the Chromebook) that for the sake of clarity I decided to hive it off as a separate post.

Game-changing features

I think the main thing I’ve had to learn in terms of my expectation of what Google Docs can do, is to consider them as functions of a large and very advanced database.  From this perspective, the vague consideration of “wow – how do they even do that?” becomes much easier to resolve and put to rest.  With that in mind, I can now take a deep breath and present some major gains I’ve found with Google Docs as opposed to working in traditional desktop productivity apps like MS Office.

Never hit “Save” (or ctrl-S) again

This is a big one.  I type out a sentence, and then pause to look up to the toolbar… the word “Saving…” presents itself for a few seconds, before eventually changing to “All changes saved in Drive”. In theory, this means I can go into a document, type some stuff, then just navigate away from it in the knowledge that the changes were saved without my even having to worry about it.  Compared with MS Office, where it’s quite normal to get completely sucked-in to writing that important document then have it crash when fine-tuning the formatting and then find you didn’t manually save that last 3 hours of work, even the Autosave functionality often doesn’t keep up with important edits.  The Google Way™ seems so much better, and has saved many a draft.

Always available, on any computer in the world…

…provided that it has an Internet connection and a modern web browser.  This has massive implications for the freedom of users to roam the planet as they need and still have access to the information that’s important to them.  Obviously this doesn’t negate the need for backup of truly valuable data – but does act as a less-admin-intensive solution than providing a full roaming Windows/Mac roaming network account with all the security and software licensing hassles that creates.

Collaboration

It’s now routine for my boss and I to dump a load of notes into a Document, or run through entries on a spreadsheet, then have both of us view and edit the same document at the same time.  While we remain online and inside the document(s), we can each see who is doing what and where – even where the cursor is for each user.  This helps us greatly in documenting expenses, working through tricky wording of contracts, manuals, specifications and other basic project management tasks.  This feature alone, working across documents, spreadsheets and even presentations, has changed our working lives for the better.

Word processing

Generally, for any document created in Google Docs itself, everything pretty much works as expected – at least from a simple “type up some notes, edit then, make them look vaguely presentable, and print/email it” perspective.
That said, some foibles have been found that have stepped in the way of my making a more complete switch to Google Docs full-time, and relying on MS Office:

  • Previewing of MS Office documents does indeed (mostly) work, but Google Docs’ more simple headings, formatting and layout options mean that document fidelity with formal reports tends to suffer.
    • Sometimes inserted graphics disappear, or are rendered very badly, or appear in the wrong place with text wrapping mangled in the process.
    • Appendices and other numbered/customised headings tend to get lost – sometimes changing the implied meaning and flow of the incoming report.
    • To get around these issues, I tend to ask those reporting to us to submit (both final and draft) reports to me either as email body text (for informal reports), or as PDF’s for more formal work.
  • Page layouts that preview well on-screen can end up with very different pagination, especially when printing to A4, or rendering to PDF.
  • Working with headers and footers is basic, but in fairness does allow insertion of tables, images etc for fine control over layout of logos, titles, author details, page numbers etc.
  • While I’m pleased to see that footnotes work, it’s not a full referencing system that can log and tabulate the source of each reference – again this makes full academic and some reporting use-cases awkward, and calls for migration to more powerful desktop software.
  • Table of Contents can be inserted, taking and automatically updating its entries from headings used throughout the document.  Good basic stuff, but:
    • No page numbers alongside the links.
    • No obvious control over which heading classes are included, nor over the specific formatting of the table entry.
    • Headings cannot be formatted with numbering, in the way that MS Word or other word-processing apps handle.  (Collaborative) Drafting of formal proposals, reports or academic writing can be done on Google Docs, but really formal documents are best having the final text copy/pasted into MS Word or a more advanced desktop word processing or page layout tool of your choice.
    • Table formatting is quite flexible, but not as many available line styles or formatting options as MS Word.
      • Also, can only move cell boundaries when they are visible, eg. when they have a border thickness greater than 0pt.
  • Printing and output
    • Page size is set to US Letter by default. This can be changed to any other supported paper size – A4 for me, please!
    • Equations entered through the Equation tool end up inconsistently placed and pixellated on both PDF and printed output.
    • Documents can be downloaded (or shared) as PDF
      • An example of the PDF output, combining these and yesterdays’ posts, is here:  SamsungChromebook303Cusability (2))
      • Useful for sending out fixed versions of a document files as a reference.
      • The PDF rendering engine can have some strange results, notably with changes to pagination.  Stray blank pages get inserted, and some placement changes made for the onscreen page preview end up looking different on paper.
      • A 20-page report (such as this one, according to the page count in the footers) on-screen ends up coming out as a PDF with 22 or more pages, depending on how and where simple page-breaks have been used.
      • Interestingly, automatically-generated page counts remain correct regardless of whether the document is viewed in the Docs editor, or as a PDF.
      • These are the kind of inconsistencies that most users I know find absolutely maddening for formal work – and a crucial limitation for users to be informed of. It’s like using a camera that takes a photo of the most beautiful mountain range in the world, at sunset, and when you download the photo to your home computer you find it actually gives you a photo of a discarded needle on a wet East London street-corner.
    • Documents can also be downloaded in common MS Office and other (more open) file formats.

Spreadsheets

My needs for spreadsheets tend to fall into one of two categories:

  1. Simple line-entries and basic summaries thereof, for things like expenses, inventory-lists and the like.  This kind of use is so easy to cater for that I’ve yet to find any flaws – and the extra collaboration and availability of the files tends to win over the bulk of a desktop application and opening an actual file from a disk.
  2. Complex mathematical data import, analysis and charting, with templates for print output of charts and tables  to be included in other documents.  Such work tends to involve complex and obscure cell functions, and often (in Excel) some customised VBA code.  Such documents have previewed in Google Docs with reasonable fidelity, but there’s no way I’d expect anything other than MS Excel to understand the file, let alone work with it in any meaninful way or timeline.

Presentations

Rather than using presentations in teaching, I tend to use more of a show-and-tell approach, or even use a Google Doc (word processor) as a virtual blackboard to help explain what’s going on.  That said, when I want a simple pack of slides to summarise the points made, or to outline the plan for a day,
I’ve not played with the Presentations tool much beyond this, mostly because I expect problems even getting Powerpoint files to open and play out correctly on another copy of MS Powerpoint – let alone transferring them to another app such as Google Presentations.  

Viewing and printing PDF’s from the Internet or GMail in Google Chrome

Google Chrome does a splendid job of showing PDF’s inside a browser window so you can read/search/save/do-what-ya-gotta-do.  That is until it comes to printing anything that is either of an unusual paper size, or um… in landscape orientation. Yuh.  Sorry about that, but it’s true.  And it looks like Google might not get around to fixing that anytime soon.

Easier workaround:

  • download the file
  • open it in your favourite PDF viewer
  • Print from the PDF viewer.

Harder workaround:

For those of you who simply *must* print from Chrome because downloading a PDF to open/print in another application is just too hard for whatever reason, then you will have to fight Chrome to make it do your will. Here’s how it plays out:

  • Find your difficult PDF on whatever website/online email account and open it in the browser.
  • Tell Chrome to Print it.
  • You’ll be taken to a print-preview window, with print controls on the left side of the screen. (As per the screenshot below)
  • You might find that a single-page document gets another blank page added to the end. I don’t know why.  If it’s a single-side document, tick “Two sided” and the blank page will get printed on the back of the page you want.
  • If the document was set to be “Portrait” mode, just enter the number of copies, select the printer, tell it to do black and white, and when you’re happy, click “print”.
  • If the document was set to “landscape” mode, then you’ll have to tell Chrome *again* that you want to print in Landscape. Otherwise your landscape document will be printed in landscape on a portrait page. Then check the other options, sending to right printer etc.
  • And you *should* be done.
  • After getting this wrong a few times, as I inevitably do every time I try to do it this way, you’ll probably appreciate the “easier workaround” above.

How to stop sending emails from GMail before they’re ready

So there you were, happily typing your email on the Gmail web page when suddenly, #POOF!#, it starts sending and before you can do anything to stop it you’re taken back to the inbox. Message sent. Ready or not.

The reason:

  1. Google have set up their email page so that pressing the “Tab” key moves the cursor to the next field or button on the web page, which in this case happens to be the “Send” button. And then when you next press “Enter” to end the line you’re still typing because you didn’t know you’d done it, off it goes.  You probably hit the “Tab” key by accident, or you maybe pushed the button intentionally to create an indent like you would in Apple Mail or Word.
  2. Alternatively if you’re anything like me, sometimes you might just get trigger-happy and blatantly hit “Send” on things that really shouldn’t be sent…

Easiest workaround:

  • Log into Gmail in Chrome, then click on the big dark cog at the top right:
  • Then select “Settings” from the menu that pops up.
  • Click on “Labs”
  • Scroll down and find the “Undo Send” lab option. Select “Enable” next to it.
  • Scroll down to find the “Save changes” button, and click it.
  • You’ll be taken back to your inbox.

Now, when you hit the “Send” button, a yellow notice comes up at the top of the browser window offering the chance to undo the send – but you only get a few seconds to do it!

Easy-ish workaround:

Don’t put the recipient’s names or addresses into the “To”, “CC” or “BCC” fields before typing your new email. If you’re replying, delete the recipient addresses.

That way, if you activate this intentional keyboard shortcut (which is what it is, no matter how annoying), it won’t be able to send because there are no addresses to send it to. And it will tell you.  And eventually you’ll drop the habit of bashing the “Tab” key without sending embarrassing or otherwise empty or half-baked emails to others.

Harder workaround:

If like me you *still* keep sending messages before they’re ready, and particularly if you’re working on a longer message that will take a while to get right, there’s no shame at all in composing the email text somewhere else and then pasting it in before sending. For incidence, I’ve written this as a document in Google Docs, and that’s enabled me to get all of the formatting, layout and thinking sorted without needing to worry I’ll send before I’m ready.