MaskImage
Blitz3D Forums/Blitz3D Programming/MaskImage
| ||
Why does maskimage never work? Ive tried it with every version of blitz3D ive had, and when i used to have blitzbasic, MaskImage has NEVER worked for me |
| ||
Do you have an example? Like a piece of code, with an image that doesn't work? This code here should work. If you see a white circle, with NO purple around it, it works. Graphics 800,600 SetBuffer BackBuffer() Global image = CreateImage(64,64) Color 255,0,255 SetBuffer ImageBuffer(image) Rect 0,0,64,64 Color 255,255,255 Oval 0,0,64,64 SetBuffer BackBuffer() maskimage image,255,0,255 While Not KeyHit(1) Cls Color 100,100,100 Rect 0,0,125,600 Color 150,150,150 Rect 125,0,400,600 DrawImage image,100,100 Flip Wend End |
| ||
Ross C ... he means the Function MaskImage http://www.blitzbasic.co.nz/b3ddocs/command.php?name=MaskImage&ref=comments |
| ||
Same thing really, as images have a maskimage of RGB(0,0,0) already applied. I've updated my code to be more thorough :o0 |
| ||
. Last edited 2012 |
| ||
No offense ;o) But, isn't it proof enough that it isn't drawing the pixels? Ayway, i wish he's post back to see if it works for him. |
| ||
. Last edited 2012 |
| ||
. Last edited 2012 |
| ||
. Last edited 2012 |
| ||
RaGR. Stop being a cheeky git. I was saying i don't see the problem with my code. It CLEARY show that maskimage is working. That's what i'm saying. My code, doesn't need any changes or additions. If you are seeing no square behind the circle, maskimage is clearly working. You, my friend, have an attitude problem. |
| ||
. Last edited 2012 |
| ||
Why exactly do i have mental problems? You have an attitude problem and deserve to be banned from the forum for personal attacks. |
| ||
I found that the main reason it doesnt work is.. when i load a jpg, maskimage doesnt work at all, and when i load a bmp, it works slightly ,but not much, i think the pixels arent being saved as exactly the color i want, more like 1 pixel off |
| ||
Well, when you save a .JPG, the images doesn't save exactly. The black pixel may got slightly distorted. You should never use .jpgs if you want to retain image accuracy and use things such as maskimage. Use a .png preferably, or .bmp. |
| ||
this was really funny to read. 2 guys getting in troubles while discussing about MaskImage - how about a discussion about religion or politics then? Seriously, take it easy. Zach - never use lossy compression for images you want to mask. Jpeg is lossy, even in the best quality setting. Instead use bmp, png, tga. Also make sure to use 32 Bit graphics since in 16 Bit mode colors will be converted to 5.6.5 Bits. And make sure to use a reliable Painting App that will save things correctly. |
| ||
Roos C and jfk and right. Masking is defeated by lossy jpegs. Also, RaGR initiates unwarranted (and unwelcome on the forum) insults, then calls the whole conversation childish. Go figure. |
| ||
Yeah, there was no need to say i have mental problems. I'm not geting worked up about the maskimage thing. Just no need for insults. |
| ||
There's a teaching that says, "As much as lies within you, be at peace with all men." It implicitly is indicating that there will be some who won't be at peace with you, no matter what you do, so you're on the right track by not letting it get to you. |