GrabImage/GrabPixmap-problem under Ubuntu 6.10

BlitzMax Forums/BlitzMax Programming/GrabImage/GrabPixmap-problem under Ubuntu 6.10

Derron(Posted 2007) [#1]
Back again I'm returning with a problem, which may also just be a problem of the PCs I run with Ubuntu 6.10 .

Under Windows XP everything wents fine... I can grab images and pixmaps, manipulate them and so on.

But under Ubuntu (so may be Linux) the "grabimage" and "grabpixmap"-commands only return garbage or blackscreens (when doing some imagecreations on black screens).

the following code works fine under XP, but under Ubuntu... only the white rects are drawn...

SetGraphicsDriver GLMax2DDriver()
g = Graphics(640, 480, 0, 60, 0)

'draw something and then grab it...
SetColor 255,255,0
DrawLine(10,10,40,40)
DrawLine(20,20,40,40)
Plot(Rnd(10),Rnd(10))
Local Img:TImage = TImage.Create(30,30, 1, DYNAMICIMAGE,255,255,255)
GrabImage(img, 10,10)
Local Pix:TPixmap = GrabPixmap(10,10,40,40)


Repeat
Cls
SetColor 255,255,255;DrawRect(Rand(100),Rand(100),30,30)
DrawImage(img, 400+Rand(60),Rand(60))
DrawPixmap(pix, 200+Rand(60), 200+Rand(60))
Flip
Until AppTerminate()



Hope someone could give me a hint how to solve this problem,

bye
MB


tonyg(Posted 2007) [#2]
I got white rectangles with GL which went away when I updated my graphics drivers.


Derron(Posted 2007) [#3]
You should see on the top-left some white rectangles...

on the top-middle-right some lines and below some lines too... but they only appear on Win and not on Ubuntu.


bye
MB


computercoder(Posted 2007) [#4]
I tried this in MacOS, and I see the white rects along with what appears as rain to the right and middle (two images - same thing)

BTW: this is a cool effect!

I'll give it a try tonight to see what I come up with under Ubuntu.


computercoder(Posted 2007) [#5]
I finally got a chance to test this out in Ubuntu. I have 6.06, and it works the same under Windows as it does on the Mac.

About the only thing I can think of is possibly Resync Mods. Other than that, maybe Ubuntu 6.10 has something different in it going on than 6.06? Perhaps getting the latest GFX drivers for your pc or maybe an older video card issue?


Derron(Posted 2007) [#6]
The modules are up to date... the gfx are an sis-741 on a desktop and a Ati Xpress 1100 on the laptop... ubuntu is also up to date (all updates installed).

On both installations only under windows the pixmap and the image are grabbed correctly... on ubuntu only garbage is grabbed.


bye
MB


skidracer(Posted 2007) [#7]
Without an initial CLS the result of your drawing will be undefined.


Derron(Posted 2007) [#8]
I tried it with an initial CLS ... but as it doesn't bring the whished changes... I removed it before posting the example... same to a flip or other things which are changing the things displayed on screen.


bye
MB


Dreamora(Posted 2007) [#9]
sounds like you have some kind of mesa driver issue as most likely non of both have true accelerated drivers at all for 3D.


computercoder(Posted 2007) [#10]
I forgot about the mesa drivers... Thats a good point.


Derron(Posted 2007) [#11]
And now what to do?

The Ati 1100 is a DX9-card so I think it got a hardware 3D-acceleration... and for Ubuntu it's using fglrx as driver.


I can't imagine a driver being the problem of a "grab something from the background" issue... if so, some other apps would also have problems.


bye
MB


computercoder(Posted 2007) [#12]
I guess I will need to install Edgy myself. The problem could *still* persist with yours and may work on mine since I have an nVidia graphics card. I'll try to install the OS this weekend on my linux box.

In case you haven't installed ATI gfx in linux before: http://wiki.cchtml.com/index.php/Ubuntu_Edgy_Installation_Guide

I agree that if an app works with OGL, then most likely others will as well.


Derron(Posted 2007) [#13]
Weekend is over... some results?

(like mentioned... problem occoured on ati and on sis)


bye
MB


Derron(Posted 2007) [#14]
Still no solutions on this? seems to only affect some ATI-cards.


bye
MB


JazzieB(Posted 2007) [#15]
Just tried this on my set-up and everything works fine. I have Ubuntu 6.10 and an ATI X1800XT graphics card. I used method 2 from the above link when I installed my drivers. Not sure if that will make any difference to your problem though.