Panel użytkownika
Nazwa użytkownika:
Hasło:
Nie masz jeszcze konta?

[allegro 4.2.1] rozjaśnienie koloru

Ostatnio zmodyfikowano 2016-02-10 17:11
Autor Wiadomość
patrykq
Temat założony przez niniejszego użytkownika
[allegro 4.2.1] rozjaśnienie koloru
» 2016-02-09 23:22:53
Witam, jak w allegro 4.2.1 rozjaśnić kolor? Chodzi mi o to, aby rozjaśnić daną bitmape/pixele, tak by kolory były białe, lecz by cieniowanie pozostało.
P-144673
darko202
» 2016-02-10 11:01:03
poszukaj

np.
funkcja ... "Wyświetla wycinek  bitmapy ze zmianą przejrzystości i jasności kolorów"
na
http:/​/allegro5kurs.blogspot.com/2012​/12​/lekcja-106-allegro5-kurs-bitmapy.html


Palette ReductionInformation about how to color-reduce a group of images, using the FixPal and Smacker utilities, by Grzegorz Adam Hankiewicz.
na
http://liballeg.org/docs.html


Allegro Quick Reference
http://www.connellybarnes.com​/documents/quick_reference.html
P-144676
Pawlo3
» 2016-02-10 13:44:51
Przenieś temat do działu 'Biblioteki'.
Wtedy uzyskasz więcej odpowiedzi.
P-144678
Gabes
» 2016-02-10 16:17:05
P-144687
Gibas11
» 2016-02-10 17:11:49
by kolory były białe
Wut?
Jeśli dobrze rozumiem to chcesz po prostu zrobić czarno-białe zdjęcie, tak? Tu masz jak to osiągnąć w SFML:
C/C++
#include <iostream>
#include <SFML/Graphics.hpp>
using namespace std;

sf::RenderWindow app( sf::VideoMode( 800, 600 ), "app" );
int main()
{
    sf::Image img;
    sf::Texture tex;
    sf::Sprite sprite;
   
    img.loadFromFile( "texture.png" );
    for( int x = 0; x < img.getSize().x; x++ )
    {
        for( int y = 0; y < img.getSize().y; y++ )
        {
            char col =( img.getPixel( x, y ).r + img.getPixel( x, y ).g + img.getPixel( x, y ).b ) / 3;
            img.setPixel( x, y, sf::Color( col, col, col ) );
        }
    }
    tex.loadFromImage( img );
    sprite.setTexture( tex );
    sprite.setPosition( 200, 200 );
   
    while( true )
    {
        app.clear();
        app.draw( sprite );
        app.display();
    }
   
    return 0;
}
P-144691
« 1 »
  Strona 1 z 1