EmbDev.net

Forum: FPGA, VHDL & Verilog VHDL Bitmap editing


von hardwarebär (Guest)


Rate this post
useful
not useful
Hello,
I want to write a VHDL program, which changes the color of specific 
forms for example a blue triangle to a green one. Now I dont know how to 
do it...

I have understood how to open a Bitmap, but the triangle and color 
recognition plus the replication of the edited Bitmap seem like an 
insoluble labyrinth for me.

Any ideas, tips or solutions for me?

Sorry for my bad english.

hardwarebär

von Lothar M. (lkmiller) (Moderator)


Rate this post
useful
not useful
hardwarebär wrote:
> Any ideas, tips or solutions for me?
I don't think you have to recognize a triangle. You simply must find 
green pixels and change them to red.

BTW: why do you not simply attach the picture and your part of the 
solution?

> Sorry for my bad english.
Write in the German uC.net forum.

von hardwarebär (Guest)


Rate this post
useful
not useful
Lothar M. wrote:
> hardwarebär wrote:
>> Any ideas, tips or solutions for me?
> I don't think you have to recognize a triangle. You simply must find
> green pixels and change them to red.
>
> BTW: why do you not simply attach the picture and your part of the
> solution?
>
>> Sorry for my bad english.
> Write in the German uC.net forum.

Ich will ja nur die Farbe der (z.B.) Dreiecke ändern(was aber erstmal 
nebensächlich ist, weil mir ein simples Farben ändern schon reichen 
würde).

Bisher habe ich noch keine brauchbare Lösung, weswegen ich nach Tipps 
oder einer "Anleitung" frage.

von -gb- (Guest)


Rate this post
useful
not useful
Iterate over all pixels. If pixel has color change color to value. 
Output pixels.

von Duke Scarring (Guest)


Rate this post
useful
not useful
hardwarebär wrote:
> Bisher habe ich noch keine brauchbare Lösung, weswegen ich nach Tipps
> oder einer "Anleitung" frage.
1
  constant red   : std_logic_vector( 23 downto 0) := x"ff0000";
2
  constant green : std_logic_vector( 23 downto 0) := x"00ff00";
3
  constant blue  : std_logic_vector( 23 downto 0) := x"0000ff";
4
..
5
..
6
  if pixel = blue and triangle = true then
7
    pixel <= green;
8
  end if;
9
..

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig