RIT image generator

classic Classic list List threaded Threaded
6 messages Options
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

RIT image generator

Hello eLuers :)
   To relax a bit on this busy weekend, I've written a simple lua utility to
convert raw image files into the format used by the imagedraw function, of
the platform-dependent disp module. The disp module currently implements
functions only for the OLED display found in some Luminary Micro ARM
Cortex-M2 evaluation kits.
   I will write a small tutorial about this but the main receipe is to
convert any image to:

- Size: 128x96
- Color: Grayscale, 16 shades of gray
- Mode: 8 bits per pixel (although each pixels uses only 4)
- Record as: .raw  (no image info added on file)

  Some more explanations on the raw and rit formats can be found in the
utility's source code.
  Program usage is: raw2disp.lua <raw_filename_without_extension>
  If you don't have a lua interpreted on the default lua install dir but has
one in your path, pls run as: lua raw2rit.lua
<raw_filename_without_extension>

  Program can be viewed/downloaded from
http://www.giga.puc-rio.br/raw2rit.lua

  Thanks to Pedro Bittencourt for the help with image formats. Pedro also
has a C version of the utility, in case someone needs it. The Lua version
uses an external module (bitlib) and the C version doesn't.

   Please share your nice images for the RIT display !!! :)

Best
Dado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090215/cb3c7c66/attachment.html 

Bittencourt Bittencourt
Reply | Threaded
Open this post in threaded view
|

RIT image generator

Dado,

I believe 128x96p isn't a requirement, the converter just need an even
number o pixels. That the user must set on disp.imageDraw ( image,
offsetX,offsetY,width,height), right?

--Pedro Bittencourt


On Sun, Feb 15, 2009 at 11:17 AM, Dado Sutter <dadosutter at gmail.com> wrote:

> Hello eLuers :)
>    To relax a bit on this busy weekend, I've written a simple lua utility
> to convert raw image files into the format used by the imagedraw function,
> of the platform-dependent disp module. The disp module currently implements
> functions only for the OLED display found in some Luminary Micro ARM
> Cortex-M2 evaluation kits.
>    I will write a small tutorial about this but the main receipe is to
> convert any image to:
>
> - Size: 128x96
> - Color: Grayscale, 16 shades of gray
> - Mode: 8 bits per pixel (although each pixels uses only 4)
> - Record as: .raw  (no image info added on file)
>
>   Some more explanations on the raw and rit formats can be found in the
> utility's source code.
>   Program usage is: raw2disp.lua <raw_filename_without_extension>
>   If you don't have a lua interpreted on the default lua install dir but
> has one in your path, pls run as: lua raw2rit.lua
> <raw_filename_without_extension>
>
>   Program can be viewed/downloaded from
> http://www.giga.puc-rio.br/raw2rit.lua
>
>   Thanks to Pedro Bittencourt for the help with image formats. Pedro also
> has a C version of the utility, in case someone needs it. The Lua version
> uses an external module (bitlib) and the C version doesn't.
>
>    Please share your nice images for the RIT display !!! :)
>
> Best
> Dado
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090215/5db35069/attachment.html 

Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

RIT image generator

Hello,

On Sun, Feb 15, 2009 at 11:39, Pedro Bittencourt <
pedrobittencourt87 at gmail.com> wrote:

> Dado,
>
> I believe 128x96p isn't a requirement, the converter just need an even
> number o pixels. That the user must set on disp.imageDraw ( image,
> offsetX,offsetY,width,height), right?


Right, indeed !
The program can also be used to convert/generate "sprites", that will later
be positioned or moved across the display, using the positioning parameters
of disp.imagedraw (pls note that syntax may change in v0.6). So the images
can be smaller than 128x96 pixels and the program will still convert them
correctly.

When I mentioned "Size" on the instructions, I should have said "Maximum
Size".
Thanks !

--Pedro Bittencourt


Dado






>
>
>
> On Sun, Feb 15, 2009 at 11:17 AM, Dado Sutter <dadosutter at gmail.com>wrote:
>
>> Hello eLuers :)
>>    To relax a bit on this busy weekend, I've written a simple lua utility
>> to convert raw image files into the format used by the imagedraw function,
>> of the platform-dependent disp module. The disp module currently implements
>> functions only for the OLED display found in some Luminary Micro ARM
>> Cortex-M2 evaluation kits.
>>    I will write a small tutorial about this but the main receipe is to
>> convert any image to:
>>
>> - Size: 128x96
>> - Color: Grayscale, 16 shades of gray
>> - Mode: 8 bits per pixel (although each pixels uses only 4)
>> - Record as: .raw  (no image info added on file)
>>
>>   Some more explanations on the raw and rit formats can be found in the
>> utility's source code.
>>   Program usage is: raw2disp.lua <raw_filename_without_extension>
>>   If you don't have a lua interpreted on the default lua install dir but
>> has one in your path, pls run as: lua raw2rit.lua
>> <raw_filename_without_extension>
>>
>>   Program can be viewed/downloaded from
>> http://www.giga.puc-rio.br/raw2rit.lua
>>
>>   Thanks to Pedro Bittencourt for the help with image formats. Pedro also
>> has a C version of the utility, in case someone needs it. The Lua version
>> uses an external module (bitlib) and the C version doesn't.
>>
>>    Please share your nice images for the RIT display !!! :)
>>
>> Best
>> Dado
>>
>>
>> _______________________________________________
>> Elua-dev mailing list
>> Elua-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>
>>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090215/f3114133/attachment.html 

Asko Kauppi Asko Kauppi
Reply | Threaded
Open this post in threaded view
|

RIT image generator


I'm beginning to understand the width of eLua.

First, I thought it's "only" about fitting to SoC's but if also  
networking and LCD displays are included, we could do projects s.a. a  
feather-light webserver, with graphical status display, right?  Think  
NAS but running without an OS (in other words, Lua would _be_ the OS).

Is this feasible, and does eLua currently allow such without an  
underlying operating system?

In more detail, what exactly is the relationship of operating system  
and eLua?  Which OSes are available, and for which features would one  
need them (think file systems, USB 2.0, networking, pre-emptive  
multithreading).

-asko


Dado Sutter kirjoitti 15.2.2009 kello 16:58:

> Hello,
>
> On Sun, Feb 15, 2009 at 11:39, Pedro Bittencourt <pedrobittencourt87 at gmail.com
> > wrote:
> Dado,
>
> I believe 128x96p isn't a requirement, the converter just need an  
> even number o pixels. That the user must set on disp.imageDraw  
> ( image, offsetX,offsetY,width,height), right?
>
> Right, indeed !
> The program can also be used to convert/generate "sprites", that  
> will later be positioned or moved across the display, using the  
> positioning parameters of disp.imagedraw (pls note that syntax may  
> change in v0.6). So the images can be smaller than 128x96 pixels and  
> the program will still convert them correctly.
>
> When I mentioned "Size" on the instructions, I should have said  
> "Maximum Size".
> Thanks !
>
> --Pedro Bittencourt
>
> Dado
>
>
>
>
>
>
>
>
> On Sun, Feb 15, 2009 at 11:17 AM, Dado Sutter <dadosutter at gmail.com>  
> wrote:
> Hello eLuers :)
>    To relax a bit on this busy weekend, I've written a simple lua  
> utility to convert raw image files into the format used by the  
> imagedraw function, of the platform-dependent disp module. The disp  
> module currently implements functions only for the OLED display  
> found in some Luminary Micro ARM Cortex-M2 evaluation kits.
>    I will write a small tutorial about this but the main receipe is  
> to convert any image to:
>
> - Size: 128x96
> - Color: Grayscale, 16 shades of gray
> - Mode: 8 bits per pixel (although each pixels uses only 4)
> - Record as: .raw  (no image info added on file)
>
>   Some more explanations on the raw and rit formats can be found in  
> the utility's source code.
>   Program usage is: raw2disp.lua <raw_filename_without_extension>
>   If you don't have a lua interpreted on the default lua install dir  
> but has one in your path, pls run as: lua raw2rit.lua  
> <raw_filename_without_extension>
>
>   Program can be viewed/downloaded from http://www.giga.puc-rio.br/raw2rit.lua
>
>   Thanks to Pedro Bittencourt for the help with image formats. Pedro  
> also has a C version of the utility, in case someone needs it. The  
> Lua version uses an external module (bitlib) and the C version  
> doesn't.
>
>    Please share your nice images for the RIT display !!! :)
>
> Best
> Dado
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev


Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

RIT image generator

Hello eLuers,

On Sun, Feb 15, 2009 at 15:44, Asko Kauppi <askok at dnainternet.net> wrote:

>
> I'm beginning to understand the width of eLua.
>
> First, I thought it's "only" about fitting to SoC's but if also
> networking and LCD displays are included, we could do projects s.a. a
> feather-light webserver, with graphical status display, right?


Yeap,
A Lua scriptable webserver is already included and I though you migh like to
hear that it will become more "Kepler-like" in the near future.

 Think
> NAS but running without an OS (in other words, Lua would _be_ the OS).
>
> Is this feasible, and does eLua currently allow such without an
> underlying operating system?


Absolutely. eLua is all you need to flash into your MCUs, no OS underneath
is necessary.
All the development can (or will soon) be done directly in the target, thru
the use of a terminal over a serial or ethernet connection. This is already
working but the FS is still a read-only one, for now.
eLua includes a small shell too and in the future, if your platform's memory
allows, will also include an IDE to help newcomers.

>
>
> In more detail, what exactly is the relationship of operating system
> and eLua?


There is only bare metal below eLua.


>  Which OSes are available,


None.


> and for which features would one
> need them (think file systems, USB 2.0, networking, pre-emptive
> multithreading).


This deserves a whole thread :)
eLua has a simple read-only file system today, that will be enhanced soon.
Support for SDCard (over SPI) is already available but not fully tested yet.

Preemptive multitasking would be implemented running several LuaStates under
an RTOS but this is not in the scope of the project at the moment.
USB 2.0 and other peripherals are beeing implemented wrapping and binding
(to Lua) manufacturer's drivers library code, when possible or adding
dedicated drivers.





-asko


Best
Dado








>
>
>
> Dado Sutter kirjoitti 15.2.2009 kello 16:58:
>
> > Hello,
> >
> > On Sun, Feb 15, 2009 at 11:39, Pedro Bittencourt <
> pedrobittencourt87 at gmail.com
> > > wrote:
> > Dado,
> >
> > I believe 128x96p isn't a requirement, the converter just need an
> > even number o pixels. That the user must set on disp.imageDraw
> > ( image, offsetX,offsetY,width,height), right?
> >
> > Right, indeed !
> > The program can also be used to convert/generate "sprites", that
> > will later be positioned or moved across the display, using the
> > positioning parameters of disp.imagedraw (pls note that syntax may
> > change in v0.6). So the images can be smaller than 128x96 pixels and
> > the program will still convert them correctly.
> >
> > When I mentioned "Size" on the instructions, I should have said
> > "Maximum Size".
> > Thanks !
> >
> > --Pedro Bittencourt
> >
> > Dado
> >
> >
> >
> >
> >
> >
> >
> >
> > On Sun, Feb 15, 2009 at 11:17 AM, Dado Sutter <dadosutter at gmail.com>
> > wrote:
> > Hello eLuers :)
> >    To relax a bit on this busy weekend, I've written a simple lua
> > utility to convert raw image files into the format used by the
> > imagedraw function, of the platform-dependent disp module. The disp
> > module currently implements functions only for the OLED display
> > found in some Luminary Micro ARM Cortex-M2 evaluation kits.
> >    I will write a small tutorial about this but the main receipe is
> > to convert any image to:
> >
> > - Size: 128x96
> > - Color: Grayscale, 16 shades of gray
> > - Mode: 8 bits per pixel (although each pixels uses only 4)
> > - Record as: .raw  (no image info added on file)
> >
> >   Some more explanations on the raw and rit formats can be found in
> > the utility's source code.
> >   Program usage is: raw2disp.lua <raw_filename_without_extension>
> >   If you don't have a lua interpreted on the default lua install dir
> > but has one in your path, pls run as: lua raw2rit.lua
> > <raw_filename_without_extension>
> >
> >   Program can be viewed/downloaded from
> http://www.giga.puc-rio.br/raw2rit.lua
> >
> >   Thanks to Pedro Bittencourt for the help with image formats. Pedro
> > also has a C version of the utility, in case someone needs it. The
> > Lua version uses an external module (bitlib) and the C version
> > doesn't.
> >
> >    Please share your nice images for the RIT display !!! :)
> >
> > Best
> > Dado
> >
> >
> > _______________________________________________
> > Elua-dev mailing list
> > Elua-dev at lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/elua-dev
> >
> >
> >
> > _______________________________________________
> > Elua-dev mailing list
> > Elua-dev at lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/elua-dev
> >
> >
> > _______________________________________________
> > Elua-dev mailing list
> > Elua-dev at lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/elua-dev
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090215/7695b14e/attachment-0001.html 

BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

RIT image generator

In reply to this post by Asko Kauppi
> First, I thought it's "only" about fitting to SoC's but if also
> networking and LCD displays are included, we could do projects s.a. a
> feather-light webserver, with graphical status display, right?  Think
> NAS but running without an OS (in other words, Lua would _be_ the OS).

That's exactly the point of eLua it: Lua is the _controller_, not just
a helper (scripting) language. This view doesn't exclude the existence
of an OS, but that's not currently planned. Plans can change though :)

> Is this feasible, and does eLua currently allow such without an
> underlying operating system?

To some extent, it is. A MPU with an interrupt system (which is
basically any MPU on which eLua will ever run) already provides the
means to implement a very simple threading system, and sometimes this
is all you need.

> In more detail, what exactly is the relationship of operating system
> and eLua?  Which OSes are available, and for which features would one

We don't have an operating system yet, so I don't know the relationship :)
As for OSes, the main candidate seems to be FreeRTOS, but there are
others that can be used. For which features ... this is difficult to
answer. I'd say for networking, to implement something like "select"
(for example) and multiple clients, but even this can be done without
an OS. In the end it all depends on your needs.

Best,
Bogdan

> Dado Sutter kirjoitti 15.2.2009 kello 16:58:
>
>> Hello,
>>
>> On Sun, Feb 15, 2009 at 11:39, Pedro Bittencourt <pedrobittencourt87 at gmail.com
>> > wrote:
>> Dado,
>>
>> I believe 128x96p isn't a requirement, the converter just need an
>> even number o pixels. That the user must set on disp.imageDraw
>> ( image, offsetX,offsetY,width,height), right?
>>
>> Right, indeed !
>> The program can also be used to convert/generate "sprites", that
>> will later be positioned or moved across the display, using the
>> positioning parameters of disp.imagedraw (pls note that syntax may
>> change in v0.6). So the images can be smaller than 128x96 pixels and
>> the program will still convert them correctly.
>>
>> When I mentioned "Size" on the instructions, I should have said
>> "Maximum Size".
>> Thanks !
>>
>> --Pedro Bittencourt
>>
>> Dado
>>
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Feb 15, 2009 at 11:17 AM, Dado Sutter <dadosutter at gmail.com>
>> wrote:
>> Hello eLuers :)
>>    To relax a bit on this busy weekend, I've written a simple lua
>> utility to convert raw image files into the format used by the
>> imagedraw function, of the platform-dependent disp module. The disp
>> module currently implements functions only for the OLED display
>> found in some Luminary Micro ARM Cortex-M2 evaluation kits.
>>    I will write a small tutorial about this but the main receipe is
>> to convert any image to:
>>
>> - Size: 128x96
>> - Color: Grayscale, 16 shades of gray
>> - Mode: 8 bits per pixel (although each pixels uses only 4)
>> - Record as: .raw  (no image info added on file)
>>
>>   Some more explanations on the raw and rit formats can be found in
>> the utility's source code.
>>   Program usage is: raw2disp.lua <raw_filename_without_extension>
>>   If you don't have a lua interpreted on the default lua install dir
>> but has one in your path, pls run as: lua raw2rit.lua
>> <raw_filename_without_extension>
>>
>>   Program can be viewed/downloaded from http://www.giga.puc-rio.br/raw2rit.lua
>>
>>   Thanks to Pedro Bittencourt for the help with image formats. Pedro
>> also has a C version of the utility, in case someone needs it. The
>> Lua version uses an external module (bitlib) and the C version
>> doesn't.
>>
>>    Please share your nice images for the RIT display !!! :)
>>
>> Best
>> Dado
>>
>>
>> _______________________________________________
>> Elua-dev mailing list
>> Elua-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>
>>
>>
>> _______________________________________________
>> Elua-dev mailing list
>> Elua-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>>
>>
>> _______________________________________________
>> Elua-dev mailing list
>> Elua-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>