Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
3 user(s) are online (1 user(s) are browsing Forum)

Members: 2
Guests: 1

amiga, mordesku, more...

Browsing this Thread:   1 Anonymous Users



« 1 (2) 3 4 »


Re: ShowPicture Image Viewer/Converter

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 134
Offline
aha, thanks. I appreciate your enthusiasm.


Posted on: 11/4 17:30
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 134
Offline
So what happens when you attach the wrong color palette to an 8bit indexed image? Answer: it makes your clown turn green! But that seems appropriate since we just had Halloween.

Seriously, how did this happen? I loaded and displayed an IMBM image with 8bitplanes called "Clown.pic" then saved it as an 8bit PNG image all using picture datatypes. But I didn't pass on the color values from the ColorRegistry and CRegs to the datatype so the PLTE chunk for the colormap was empty. Since the CMAP in the ILBM is a UBYTE array of 256 RGB color values, and PLTE is a UBYTE array of 256 RGB color values I assumed they were interchangeable. I copied the color data immediately following CMAP to PLTE (ILBM to PNG). They are interchangeable, and everything would have gone smoothly, but for one small matter. The four bytes immediately following the CMAP is the SIZE of the CMAP. The four bytes immediately following the PLTE chunkID is just RGB pixel data. So the colormap was shifted four bytes to the right, and four bytes at the end were missing!

Unwittingly, I just used "Color Shift" which is a function I have wanted to write for a while now to use "Color Space" and "Color Distance" to shift the entire color palette to different parts of the spectrum, in this case we shifted toward green. This deserves more investigation at a later time when I write the Color Shift function. But it's all fun.

Posted on: 11/4 19:00

Edited by miker on 2017/11/6 14:00:20
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
2016/8/16 0:09
Group:
Member
Posts: 319
Offline
hi Miker,

Could you please edit your post and change its "view requirements" (below editor window).

All that people are able to see right now is:
Quote:

To view this post, you must login and reply first.


Which means that only after i've posted this am i able to see what you wrote and respond accordingly..... the logic wonders of forum-software (or dee-dee user pressing all the buttons)


Posted on: 11/6 0:26
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
2004/4/7 4:26
Group:
Member
Posts: 4359
Offline
Well, let's try to answer....

Posted on: 11/6 7:03
_________________
p.bes
Icaros Desktop AROS distribution mantainer
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
2004/4/7 4:26
Group:
Member
Posts: 4359
Offline
Miker wrote:

Quote:
So what happens when you attach the wrong color palette to an 8bit indexed image? Answer: it makes your clown turn green! But that seems appropriate since we just had Halloween.

Seriously, how did this happen? I loaded and displayed an IMBM image with 8bitplanes called "Clown.pic" then saved it as an 8bit PNG image all using picture datatypes. But I didn't pass on the color values from the ColorRegistry and CRegs to the datatype so the PLTE chunk for the colormap was empty. Since the CMAP in the ILBM is a UBYTE array of 256 RGB color values, and PLTE is a UBYTE array of 256 RGB color values I assumed they were interchangeable. I copied the color data immediately following CMAP to PLTE (ILBM to PNG). They are interchangeable, and everything would have gone smoothly, but for one small matter. The four bytes immediately following the CMAP is the SIZE of the CMAP. The four bytes immediately following the PLTE chunkID is just RGB pixel data. So the colormap was shifted four bytes to the right, and four bytes at the end were missing!

Unwittingly, I just used "Color Shift" which is a function I have wanted to write for a while now to use "Color Space" and "Color Distance" to shift the entire color palette to different parts of the spectrum, in this case we shifted toward green. This deserves more investigation at a later time when I write the Color Shift function. But it's all fun.

Posted on: 11/6 7:04
_________________
p.bes
Icaros Desktop AROS distribution mantainer
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 134
Offline
Sorry, that was a secret message.

I tried to post a screenshot but something happened. It wasn't because of file size. I make sure screenshots are less than 1MB. I can usually post the first screenshot when starting a new topic, but all attempts after fail. It's probably user error!

Posted on: 11/6 14:03
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 134
Offline
Sorry, that was a secret message.

I tried to post a screenshot but something happened. It wasn't because of file size. I make sure screenshots are less than 1MB. I can usually post the first screenshot when starting a new topic, but all attempts after fail. It's probably user error!

Posted on: 11/6 14:04
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 134
Offline


New Pic.

Attach file:



png  PNG-ILBM-Palettes3.png (295.88 KB)
6991_5a05620a13754.png 800X640 px

Posted on: 11/10 0:18
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 134
Offline
Made some progress Loading, Displaying and Saving 8bpl ILBM to 8bit PNG.

I was having some difficulty setting ColorRegisters and ULONG *CRegs in the Picture DataType before saving so the color map wasn't getting copied to the resulting image. But I found a nice little function called CMAP2Object that did work well. Now it's possible to save 8bit images using picture datatypes with ShowPicture.

Now that I have the basic datatypes framework based on two main functions (Load_Image_DT and Save_Image_DT) the next thing to do is to set up a menu system to make things more user friendly.

Posted on: 11/10 0:26
Transfer the post to other applications Transfer


Re: ShowPicture Image Viewer/Converter

Joined:
2004/4/7 4:26
Group:
Member
Posts: 4359
Offline
Miker, I am really happy to see you're progressing. Improving the datatype system was in AROS' "to do" list for so much time.

Posted on: 11/10 0:39
_________________
p.bes
Icaros Desktop AROS distribution mantainer
Transfer the post to other applications Transfer



« 1 (2) 3 4 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4359
2 magorium
magorium
4095
3 phoenixkonsole
phoenixkonsole
3892
4 nikolaos
nikolaos
3693
5 deadwood
deadwood
2923
6 ncafferkey
ncafferkey
2646
7 mazze
mazze
2214
8 clusteruk
clusteruk
2109
9 Kalamatee
Kalamatee
2024
10 damocles
damocles
1789
© 2004-2017 AROS Exec