AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Image colors palette
Thema durchsuchen
Ansicht
Themen-Optionen

Image colors palette

Ein Thema von WojTec · begonnen am 9. Apr 2012 · letzter Beitrag vom 10. Apr 2012
Antwort Antwort
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Image colors palette

  Alt 9. Apr 2012, 17:11
I want to get colors palette from image, like cssdrive.com/imagepalette or bighugelabs.com/colors.php.

I did it by random pixels from image (looks to be very lame method) and with GIFImg.pas.ReduceColors() (very slow).

Could you share more solutions if you know some?

  Mit Zitat antworten Zitat
Medium

Registriert seit: 23. Jan 2008
3.686 Beiträge
 
Delphi 2007 Enterprise
 
#2

AW: Image colors palette

  Alt 10. Apr 2012, 02:44
What images? There are those, that come with an associated palette, and others that have none at all. From the latter you may derive a palette, but then the question is, what restrictions you need/want to apply to it (color space, number of colors, etc.), and if it is okay to thereby reduce the image's color depth (i.e. make a 256-color paletted image from a 24-bit true color one). Then, maybe even dithering comes into play, and more so palette optmizations, which are actually not that trivial if done well. Or do you not need to actually change the image itself but simply obtain a "most common colors and shades"-table?

So. What exactly do you want/need to achieve? What is your readily available base data, and what do you need to output?
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#3

Re: Image colors palette

  Alt 10. Apr 2012, 18:12
I want to do something like services from above links.
Also reduce image to 256 colors.
Also get all distinct colors.

Image is loaded to TBitmap32.
  Mit Zitat antworten Zitat
Medium

Registriert seit: 23. Jan 2008
3.686 Beiträge
 
Delphi 2007 Enterprise
 
#4

AW: Image colors palette

  Alt 10. Apr 2012, 23:58
That would be a rather wide field of theory, since one can go about this process in a large amount of different ways that differ greatly in complexity and quality of the results, and is highly dependent on the desired output format (how many colors per palette, format of the colors inside the palette, fixed colors from preset palettes or partial palettes to consider, etc.).
These three articles may give you a decent entry point: This one surely will, that will come up fast and that here gives a rather coarse but useful text to get you accustomed to some of the terminology you will come across.

PS: I'd be interested in the Photoshop-Clone you/we program here. It would be nice to see a version on here one day

PPS: It still is unclear waht the source images are, but I assume it's going to be "arbitrary". G32 transforms everything into 24/32 Bit RGB color space anyways if I recall correctly. But beware! Especially when it comes to (semi-)professional use, 24/32 Bit images is not the high end, and many formats desired by printing companies/processes may not even be supported by G32, nor would they be able to be worked with using G32 properly. There even are image formats out there, that work with colors represented by float values, maybe even CMYK and others, and to make things worse: Color-profiles. There you should ask yourself how professional you want to get (or what your audience is).
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)

Geändert von Medium (11. Apr 2012 um 00:12 Uhr)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz