Jump to content

Strange .png problem


MAB

Recommended Posts

i am drawing this image and this image but there are 2 strange white things at its start and its end

i drew 2 more couple of images like this but it don't have white things they have the same size

dxDrawImageSection(x*890,y*67,50,(health/2)*-1,0,0,50,(health/2)*-1,"hi.png") 
dxDrawImage(x*890, y*17, 50, 50, "ho.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) 

Link to comment
  • Moderators

When you change your image to 1 color and export(web) it as png-8.

You won't have that problem any more. png-24 is kinda tricky to draw with a lot alpha blending.

But check your photoshop export settings correctly! The png-8 settings from photoshop are not correct by default!

Also you might want to try dxCreateTexture first.

- Speeds up the render speed.

- Can be compressed with dxt1,dxt3,dxt5. For using less GPU(video card) memory. I recommend dxt5.

- Two ways to render the edges: wrap and clamp

Difference between png-8 (left) and png-24 (right):

mta_screen_2015_10_26_14_33_36.png

Link to comment
When you change your image to 1 color and export(web) it as png-8.

You won't have that problem any more. png-24 is kinda tricky to draw with a lot alpha blending.

But check your photoshop export settings correctly! The png-8 settings from photoshop are not correct by default!

Also you might want to try dxCreateTexture first.

- Speeds up the render speed.

- Can be compressed with dxt1,dxt3,dxt5. For using less GPU(video card) memory. I recommend dxt5.

- Two ways to render the edges: wrap and clamp

Difference between png-8 (left) and png-24 (right):

mta_screen_2015_10_26_14_33_36.png

I still don't undeerstand how to use createTexture or how to slove my problem

Link to comment
There are is an example on the wiki how to use textures.

The problem was with the position... totally strange... i replaced the 6 images with other 6 images.. and guess what? the same white things for the one that replaces the old 2 images that got that position ... i moved them 10 X and the white things gone

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...