🖌️Annotating Images in Glide: Free Draw and Text Input 🖼️

I’m excited to showcase an application I’ve developed in Glide for annotating images. This app allows users to freely draw or add text annotations on top of an image, with each annotation type being stored in separate columns—one for the image and one for the annotations. For now, the data is stored using Glide’s API, which works well within the platform’s limitations.

This project is just a starting point to demonstrate that it’s possible to implement image annotation directly within Glide itself. While the app is functional, one limitation is the security of using Glide’s API for handling sensitive data. As I continue developing, I am considering expanding the app using Google Apps Script (GAS) or hosting it on GitHub to address these concerns and provide more flexibility.

The trial period for this app will be available until the end of December 2024, or until the limit for updates is reached. You’re welcome to try it out and see how it works. I hope this serves as inspiration for others looking to build similar tools in Glide!

9 Likes

That’s pretty neat! Thanks for sharing.

1 Like

How!? This is so cool!

Clean :+1:

1 Like

Hey Himaladin! Couple questions…

  • What 3P service did you use for the annotations?
  • Does this work with PDFs?

Would love to hear more as this might be useful for a possible project of mine. Thanks so much in advance!

I didn’t use any third-party service for annotations. The annotation functionality is implemented using custom JavaScript code, leveraging native Glide APIs and HTML5 Canvas. The data for annotations comes from Glide JavaScript columns, and everything operates directly within the app’s iframe.

The main issue lies in security, as exposing API keys on the frontend can be a concern if these annotations are to be saved back to Glide columns. Therefore, it’s better to develop this script using Google Apps Script (GAS) and deploy it as a Web App (which can be embedded with Glide’s web embed component). This approach is especially suitable for those using Glide integrated with Google Sheets, as it eliminates the need to involve Glide’s API.

If you are using Glide with Google Sheets, Google Apps Script can directly read and write data to Google Sheets without requiring Glide API. This method is particularly useful for Glide plans that already integrate directly with Google Sheets, as it avoids the need for additional API calls. For plans where integration with Google Sheets is not available, using the Glide API becomes unavoidable. Even in such cases, Google Apps Script remains the safest option because it allows you to securely store and manage the API key in the backend, preventing it from being exposed on the frontend.

Currently, this setup is tailored for image annotations, but it can be extended to support PDFs. However, to achieve this, you would need to render PDF pages as images using a library like PDF.js, overlay the annotation tools on the rendered canvas, and then save the annotations. Note that this approach will result in an exported PDF that includes the annotations as part of the image, not as separate layers within the PDF. If you wish to maintain the original PDF structure while adding annotations, you’ll need a more advanced library like pdf-lib or PDFKit to handle the direct manipulation of PDF files.

Since I’m no longer subscribed to Glide, I apologize for not being able to demonstrate how this application works in a PDF environment. However, if you only want to create Free Draw annotations, you can try doing so using Glide’s AI component. But if it involves text annotations, the complexity increases significantly, making it challenging to integrate and communicate with AI. Furthermore, as of now, I haven’t been successful in implementing download and print functions with the AI component.

2 Likes

That’s a shame, we miss you.

2 Likes

Thank you Darren, that means a lot to me. Although I’m no longer subscribed to Glide, I truly appreciate all the great experiences I had here. Wishing you all the best moving forward!

3 Likes

Thanks for everything that you shared here! All the best.

2 Likes

You’re welcome, ThinhDinh. If I get the chance, I’ll definitely come back to share more and look forward to your feedback—it’s how I learn. :wink:

2 Likes