element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum Tools (or tricks) to develop graphics/animations for OLED displays (single-color 128x64 or 64x64 style)?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 21 replies
  • Subscribers 481 subscribers
  • Views 11765 views
  • Users 0 members are here
  • oled
  • i2c
  • display
Related

Tools (or tricks) to develop graphics/animations for OLED displays (single-color 128x64 or 64x64 style)?

baldengineer
baldengineer over 3 years ago

image

I'm working on a project that is using one of those I2C OLEDs with 128x64 pixels.

I'd like to jazz it up with some simple graphics and maybe even 2-3 frames of animation. Very simple stuff like a Hershey's kiss-shaped blob of pixels that falls "down" the screen.

As I think about drawing the graphics, all that comes to mind is some graph paper and lots of shading.

Does anyone have other tools they have used or know of that could help to create these graphics (and bonus if they generate arrays in C!)

(For now this specific project, I'm writing code for an ESP32 using the Arduino library.)

Edit

I do not need any more tools to convert bitmaps into C-Arrays. I'm up to a dozen now.

But thank you for the suggestions!

  • Sign in to reply
  • Cancel

Top Replies

  • BigG
    BigG over 3 years ago +4
    I use the Inkscape export function (set to 96 dpi) to create the graphic (png format) and then the LVGL online tool to convert: https://lvgl.io/tools/imageconverter .
  • rsc
    rsc over 3 years ago +4
    Here's a tool I wrote for 96 x 96 OLEDs on HexiWear boards https://www.hackster.io/r-scott-coppersmith/hexiwear-oled-bitmap-tool-938ed1 https://github.com/CapperLabs/HexiWearOLEDbitmapTool Scott
  • robogary
    robogary over 3 years ago +3
    found this but hadnt tried it. https://www.mischianti.org/images-to-byte-array-online-converter-cpp-arduino/ https://manytools.org/hacker-tools/image-to-byte-array/ the trick is to search for the needed…
  • robogary
    0 robogary over 3 years ago

    This tool is for converting graphics into byte arrays , which I used to animate SSD1306 screens for RPi Pico. It was so fun I had to mention it. I expect to find similar for C. I had so much fun tho, I had to share this version. www.tomshardware.com/.../oled-display-raspberry-pi-pico 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robogary
    0 robogary over 3 years ago in reply to robogary

    mmmm the link did something weird   www.tomshardware.com/.../oled-display-raspberry-pi-pico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robogary
    0 robogary over 3 years ago

    found this but hadnt tried it.  https://www.mischianti.org/images-to-byte-array-online-converter-cpp-arduino/      https://manytools.org/hacker-tools/image-to-byte-array/

    the trick is to search for the needed vernacular 

    Whatever image I used, I had to use Paint to reduce the pixel size of the image to match the desired pixel array size, 128X64 , 64 X 64 etc.. 

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robogary
    0 robogary over 3 years ago

    BTW - graphics , I used powerpoint to start  , but can fetch any image you want , and modify as needed in Paint.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • baldengineer
    0 baldengineer over 3 years ago in reply to robogary

    Looks like that article referenced this img2bytearray tool.

    Granted, its output is a Python bytearray, but converting it into a C-array isn't a big deal.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • baldengineer
    0 baldengineer over 3 years ago in reply to robogary

    Yeah, i was hoping someone made some tools more focused on pixel art. Those are always an option.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • baldengineer
    0 baldengineer over 3 years ago

    Totally not what I had in mind, but a related tool is this Display Generator.

    image

    It's a web-based implementation of the Adafruit GFX Library. Give it the code you'd use and it'll draw the display. Looks handy to do some pixel pushing without having to waiting for the compile/upload cycle.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dougw
    0 dougw over 3 years ago

    I use a bunch of tools to do stuff like this. Probably not an ideal workflow, but it is free.

    Here is a guy who creates the animation C arrays using VB (for an OLED) ... pretty neat...

    He also uses some of the same tools I would use.

    https://www.youtube.com/watch?v=0KGMFhFQ0YY&ab_channel=VolosProjects

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • baldengineer
    0 baldengineer over 3 years ago in reply to dougw

    Oh, interesting workflow and tools. This video gives me a few ideas.

    Also, I really like stuff that Volvos does! In fact, I have some of the prototype boards he designed. (and they are great!)

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 3 years ago

    Hi!

    Although I dislike Corel products (over-bloated and so many nag ads), Paint Shop Pro is surprisingly good at being a tool between images and microcontrollers.

    With it, you can save images in RGB formats, but you can also save them using a reduced palette. For instance, if your OLED only supports three colors, then the file output will only contain 3 values (0,1 and 2) for each pixel, if your image is of three colors. To do this, it's easy, first reduce the number of colors (there's a menu option to do that), then do File->Save As, and select "Raw" format (it sounds like a camera format, but it isn't, instead it's literally just a byte per pixel, with no file header or anything. PSP will count the colors in the image, and assign a value from 0 upward, to each color.

    Let's say the image was 32 x 32 pixels, that's 32x32=1024, and that's exactly the file size that PSP will save.

    Then you can use C or Python or whatever to convert it to a C array (if that's what you want) with 10-15 lines of code. The ordering is left to right, for each row, from top to bottom from memory. If (say) your OLED only has 1 color, then you might want to pack the pixels into a byte, so that's implementation-dependent of course.

    It's actually super-useful in the other direction too. For instance, if you're working with a microcontroller and don't have the display yet, then if you're writing to RAM (a framebuffer basically), one or two bytes per pixel, then provided you can dump that RAM to a file, then you can use PSP to directly accept that file and show it as an image.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube