locked
October Challenge - 12 bit 4096 colors image RRS feed

  • General discussion

  • Hi!

    I have an idea for October Challenge ! her is my suggestion:

    write a program that would be representing a modern but transformed image in mode 12-bit depth, 4096 colors as were the images produced by the Amiga 500 computer where any other computer in the early 1980s.
    The images were usually 320 x 240 pixels. As you can - see here, I chose a normal 6-megapixel image, I turned with a paint program, in 4096 colors 320 pixels.

    I think it would be a programming exercise interesting to write a program to simulate these old images.

    is that possible ? i will certainly try :)

    Here modern image transformed in a 12 bit color depth 4096 colors.

    Ans here the modern JPG images  3888x2592 pixels, 300dpi image




    • Edited by YLedEditor Saturday, September 24, 2016 2:07 PM
    Friday, September 23, 2016 7:50 PM
    Answerer

All replies

  • So the challenge is to make a good image look worse? =^)

    That's pretty funny!

    Thanks, YLed!


    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Saturday, October 8, 2016 1:30 PM
  • Hi Ed !

    Yes, it sounds funny, to return to these old images.

    It is as if we would ask to return to black and white TVs in our homes!

    Well then, we can see it like this:

    trying to convert an image of several megapixels in a picture whose file would be less than 100 kilobytes of weight, and it is recognizable! but without using a program such as the jpg, gif, and other image compression.

    Saturday, October 8, 2016 3:17 PM
    Answerer
  • Here is my solution for this Challenge:

    A normal picture colors palette is :  R,G,B, ( 255,255,255 ) 

    or 255x255x255 unique colors = 16,581,375 colors.

    in this SBasic program ( with no LitDev ext ) , i wrote an algorythm to compress the colors palette.

    So many colors have been leveled.

    By giving different values to the Nc variable, we can reproduce the image with a maximum X  colors.

    For a 125 colors image:

    Nc will have a value of 50  
     ( 255/50=5,1  math.floor (R,G,B)=( 5,5,5) = 5 x 5 x 5 = 125

    So the final image look very close to those was produced by computer of the 80's

    program no: XJG137

    time to process around 5 minutes.

    NORMAL IMAGE: ( photography by YLed, autumn in North America )

    process image 27 colors, Nc value 85

    process image 125 colors, Nc value 50


    here is the 4096 colors image, Nc value of 16

    With Nc =2 we have nearly 2 millions colors, but if the Red value is use for G an B value

      R=(MATH.floor(R/Nc))*Nc
      G=(MATH.floor(R/Nc))*Nc
      B=(MATH.floor(R/Nc))*Nc

    i ended with a black and white image , emphasis on RED values:



    • Edited by YLedEditor Sunday, October 9, 2016 1:05 AM
    Saturday, October 8, 2016 6:50 PM
    Answerer
  • We can use a color format "#rgb" in Small Basic.  So, this is the sample: KHD518.

    Screen shot of a program 4096 Colors


    Nonki Takahashi

    Thursday, October 13, 2016 10:42 PM
  • @Nonki

    nice works !

    Friday, October 14, 2016 12:26 AM
    Answerer