You are not logged in.

#1 2012-09-20 13:28:08

zacariaz
Member
From: Denmark
Registered: 2012-01-18
Posts: 539

Xserver modding and whatnot...

First of all I know it's not a very good title, but it was the best I could come up with, so feel free to suggest something else.

On to the problem at hand, which is that I'd like to intervene and change the image which is actually displayed on the monitor (before it is displayed obviously) and modify it. The algorithm I intent to apply is the same for all pixels, but it isn't something general like grayscale conversion or similar.

The best idea I can come up with as to how to handle this problem, are generally way to advanced for me, but then again they are pretty far fetched, just look at the title. wink

Anyway, if you got any idea, please let me know.


Best regards.

Edit:
I should mention that this is to work on a standard Xserver with OpenBox or similar.

Last edited by zacariaz (2012-09-21 13:45:41)


I am a philosopher, of sorts, not a troll or an imbecile.
My apologies that this is not always obvious, despite my best efforts.

Offline

#2 2012-09-20 20:33:57

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Xserver modding and whatnot...

If you want to change the pixels X draws then you would work with the xserver not the graphics driver. Perhaps you can have a look at the source code for something like redshift to see how it gets between the xserver and the screen.


You're just jealous because the voices only talk to me.

Offline

#3 2012-09-21 13:44:57

zacariaz
Member
From: Denmark
Registered: 2012-01-18
Posts: 539

Re: Xserver modding and whatnot...

I don't know what redshift is, but I'll certainly look it up. I also assumed that it would be possible to do something with X, but I simply don't know enough about how such things work. I'm more of a console applications guy. wink

Anyway, I'll be back.


I am a philosopher, of sorts, not a troll or an imbecile.
My apologies that this is not always obvious, despite my best efforts.

Offline

#4 2012-09-21 17:51:52

zacariaz
Member
From: Denmark
Registered: 2012-01-18
Posts: 539

Re: Xserver modding and whatnot...

I've so far been unable to find the relevant part of  source code for redshift, and my google searches (I'm usually rather good with that particular bit) haven't turned up anything either.

I've Looked a bit at the Xlib documentation, but haven't found anything there either.

And so on and so forth.

Obviously I'm not going to stop here, but as always I appreciate all the help I can get.


Best regards.


I am a philosopher, of sorts, not a troll or an imbecile.
My apologies that this is not always obvious, despite my best efforts.

Offline

#5 2012-09-21 18:05:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Xserver modding and whatnot...

Depending on what the algorythm is that you are thinking of, you may want to look into Xlibs colormaps.

Responding to every redrawing of every client and any other screen activity on the server then recalculating and redrawing the whole screen would be extremely resource intensive.  But if you modify the colormap you'll allow X to go about it's business but with new definitions for colors.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2012-09-21 18:11:30

zacariaz
Member
From: Denmark
Registered: 2012-01-18
Posts: 539

Re: Xserver modding and whatnot...

Trilby wrote:

Depending on what the algorythm is that you are thinking of, you may want to look into Xlibs colormaps.

Responding to every redrawing of every client and any other screen activity on the server then recalculating and redrawing the whole screen would be extremely resource intensive.  But if you modify the colormap you'll allow X to go about it's business but with new definitions for colors.

My thoughts exactly. There would be a number of simple and similar algorithms, probably 7 in total, but only one i effect of the users choice. Well, that's the start of it anyway. Later I might want to expand upon the concept, but color maps still seem like the right direction.

Anyway, I have to hurry getting to a concert. Will be back later of course.


Best regards.


I am a philosopher, of sorts, not a troll or an imbecile.
My apologies that this is not always obvious, despite my best efforts.

Offline

#7 2012-09-21 18:18:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Xserver modding and whatnot...

If you haven't been there yet, Christophe Tronche's xlib guide is my one-stop-shop for everything xlib related.

Here's the chapter on color management.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB