Getting bitmaps into the GLK12232

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
spillner
LCD?
Posts: 5
Joined: Fri Mar 31, 2006 5:57 am

Getting bitmaps into the GLK12232

Post by spillner »

Three related questions:

1. Am I misusing the bitmap editor in mogd.exe, or is it buggy? I've got the resolution configured as 122x32 (which is correct for my GLK12232-25), but the 'Drawing tool' canvas is always 244x64 (or something close to that, as reported by the mouse position.) When I import a 122x32 monochrome .bmp, it fills the canvas (i.e. each pixel in the image file corresponds to a 2x2 block of pixels on the canvas.) I've verified the image file dimensions in other tools (The Gimp, paint.exe, various bitmap viewers) so I don't think it's malformed or corrupted.

Anyway, if I upload the image while the brush width is set to 1, it writes the upper-left quarter of the canvas to the LCD, and then continues writing data from the other quarters so the display winds up garbled and only vaguely resembling the original image. If I set the brush width to 2 and upload, I get a miniaturized version of the entire bitmap in the left half of the display and blank space in the right half. If I select larger brush sizes I get correspondingly smaller copies of the image and larger regions of empy space on the LCD. How does one get a 122x32 image uploaded as a 122x32 image? Is there a way to force the canvas to remain 122x32? I'm running Windows XP SP2 and the latest mogd from http://www.matrixorbital.ca/software/so ... aphic/MOGD; the display is a GLK12232-25-WBL with PCB revision 2.00.

2. Why does the technical manual for this display differentiate between the 'saved' and 'on-the-fly' bitmap formats? (see pages 11 and 12 of http://www.matrixorbital.ca/manuals/GLK ... BL_200.pdf ) I understand the difference between the formats (column-major vs. row-major encoding), but I don't see any commands that expect data in the on-the-fly format. Is there an undocumented command that accepts an on-the-fly bitmap and renders it at a given location? For example, does the 'upload preview' button in mogd.exe use such a command instead of plotting individual pixels?

3. Are there any undocumented commands that XOR the screen with a bitmap instead of simply filling it with the bitmap? Does MO make any displays that support this, or have plans to create a firmware update with such a command?
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hi spillner,

1. You are not misuing mogd.exe, I confirm that the drawing canvass is set to 240x64 (which is the current largest size of MO graphic displays). No matter what size the settings are in, the canvass remains at 240x64, and so yes, this is a bug of the software. Because of this bug, the software tries to draw your 122x32 image as a 240x64 image that will then be drawn by the 122x32 display, hence the bitmap becomes garbled. The drawing canvass on mogd works properly with the 240x64 displays, though (of course,eh?). May I suggest to just load the bitmap using Download Image tab, then use command 98 (display saved bitmap) to display the bitmap.

2. The manual differentiates the saved and inline bitmaps because this is actually how the code is written. Unfortunately, there is a mention of inline ('on-the-fly') althougjh this is NOT implemented on the GLK12232-WBL. The 'upload preview' button in mogd only uses individual pixel plotting.

3. There are no documented (nor undocumented) commands that XOR the screen with a bitmap. There is no implementation of such a command because of code size on our end.

For your information, we are in the process of completely overhauling the GLK12232-25-WBL. We will be implementing on-the-fly bitmap screen write command among other new features and enhancing commands; we expect a difference in screen write speed. We have actually released the first batch of our redesigned graphic displays (GLK24064-25 and GLC24064). Please take time to read the manual for these displays http://www.matrixorbital.ca/manuals/GLK ... 5_200.pdf)
because this is how we will be implementing the new GLK12232-25-WBL, which will be launched in about 4 months.

Best Regards,
Raquel Malinis
Design and Development
Matrix Orbital
Jeroen Vonk
LCD Guru
Posts: 55
Joined: Tue Apr 12, 2005 2:31 am

Post by Jeroen Vonk »

Hi Raquel,
Raquel wrote: 1. You are not misuing mogd.exe, I confirm that the drawing canvass is set to 240x64 (which is the current largest size of MO graphic displays). No matter what size the settings are in, the canvass remains at 240x64, and so yes, this is a bug of the software.
Well, it's not a real bug, it was never implemented because a 122x32 screen was not available when the software was written.
Raquel wrote:For your information, we are in the process of completely overhauling the GLK12232-25-WBL. We will be implementing on-the-fly bitmap screen write command among other new features and enhancing commands
Could you tell what the main differences are between the new and the old screens?

Regards,
Jeroen
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello Jeroen,

Pardon me for the statement about the software. I did not know the history until now.

If I can get your email, I'll make a list for you tomorrow.
Mine is rmalinis@matrixorbital.ca
Raquel Malinis
Design and Development
Matrix Orbital
spillner
LCD?
Posts: 5
Joined: Fri Mar 31, 2006 5:57 am

Post by spillner »

Jeroen,

>Well, it's not a real bug, it was never implemented because a 122x32 >screen was not available when the software was written.

However, the Settings dialog allows the user to choose a display size from the set { 240x64, 128x128, 122x32, 128x64 }, so the 122x32 devices appear to have been at least anticipated by the author. The behavior of the "Brush size" option is also odd, and probably difficult to defend as correct; selecting a brush size larger than 1 causes some kind of filtering operation to be performed on the data sent to the screen by the preview command, which is unintuitive for something that sounds as though it should only affect the behavior of the drawing tools. For example, if value of the pixel to be written to screen position [x, y] were copied from the buffer value at [brush_size * x, brush_size * y], the preview button would be basically usable with the 122x32 display when a brush size of 2 is selected; unfortunately, the program seems to implement a transformation more like [ x <- x/(brush_size^2), y <- y/(brush_size^2)]. Try it!

Anyway, the rest of the program seems to work well with the GLK12232. Perhaps Matrix Orbital will be able to justify a new version (this one is now seven years old) to take advantage of the new GLK24064 and GLK12232 firmware.
Jeroen Vonk
LCD Guru
Posts: 55
Joined: Tue Apr 12, 2005 2:31 am

Post by Jeroen Vonk »

Hi Spillner,
spillner wrote: However, the Settings dialog allows the user to choose a display size from the set { 240x64, 128x128, 122x32, 128x64 }, so the 122x32 devices appear to have been at least anticipated by the author.
That's true.... and I should know because I am the author :D Unfortunately because of a major mistake I lost the source code (please dont laugh, I feal stupid enough :oops: ) so there is no way of adjusting that piece of software.
spillner wrote: Anyway, the rest of the program seems to work well with the GLK12232. Perhaps Matrix Orbital will be able to justify a new version (this one is now seven years old) to take advantage of the new GLK24064 and GLK12232 firmware.

I wrote a new version of the software (not using Delphi anymore, but C# using the .NET framework) If you like, you might try it, you can find the link in my signature. If you have any suggestions, please drop me a line.... (and FYI, I'm currently working on a .NET 2.0 based version which also runs on Linux.)
Post Reply