No announcement yet.

Design Screen layout with duplicate images

  • Filter
  • Time
  • Show
Clear All
new posts

  • Design Screen layout with duplicate images

    I'm going to use serial commands to load images from the SD card. But I'm using the same image multiple times over several forms. This will cause multiple copies on the SD card. But I need to know the x,y location of the images. So how do I go about this? Do I create duplicates on the SD card, or only one copy and call the same image when needed? But then I will not know the location to place the image. I hope this makes sense.


  • #2
    Example the Green LED blocks
    Attached Files


    • #3
      Dear Marinus,

      You can use a single image multiple times on the same or several forms. You do not need to duplicate a copy and just call the image when needed.

      For x and y, you will be the one to set where you want to locate the image on the display. Since, you know the size of the image and the display size. If for example, you are using uOLED-160-G2 which has a size of 160(W) x 128(H) pixels then you can calculate that the x can be greater than 0 but less than 160 - image length and y can be greater than 0 but less than 128 - image height.

      To do this, you need to save an image into the uSD card. Then use serial commander to test, initialize the uSD card using media_Init, then set the image address using media_SetAdd where you need to input HiWord and LoWord and show the image using media_VideoFrame where you need to input X, Y and the framenumber of the image that you want to show.

      Thank you.

      Best Regards,