Author Topic: Issue with _PUTIMAGE and XOR plus issue loading PNG files [FIXED]  (Read 8863 times)

0 Members and 1 Guest are viewing this topic.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Issue with _PUTIMAGE and XOR plus issue loading PNG files [FIXED]
« Reply #15 on: August 16, 2018, 06:56:12 pm »
I'm thinking it's basically this line:


                'put the tile to check over the test copy with XOR
                PUT (320, 200), temp(), XOR
                'zoom in on that area

The XOR here fails to behave as you'd expect and turns the screen segment black.

******************

Question:


                'get the test copy to see if it was erased
                GET (320, 200)-(335, 215), temp(257)


In the above, shouldn't you GET temp()?  Why get temp(257)?   What am I missing here?



The 257 is where the data storage begins, I don't want to over write the original tile which is stored from 0-256
I'm actually surprised you wouldn't have known that Steve.
That way I can check to see if there are any colors left meaning that pixels weren't erased, and a new tile was found. then I can PUT TEMP(0) onto the found layer and don't have to waste cycles getting the original test tile again.


XOR is used to erase a previous sprite using PUT, so if you put 2 copies of a sprite in the same place and use XOR it is supposed to basically erase the image. thats why I'm using it to find all the tiles that make up WarCrafts human campain maps.
I test each one by puting the tile XORed over a putimage copy and GET the area and count the RGB values, if the sprite is erased by XOR the result is 0 and I ignore that tile cause I already found it.

OH yeah thats right, GET copies the image correctly after the PUT (),,XOR. but I can't enlarge the image with it that is why I'm using PUTIMAGE to move it to the top left corner.
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: Issue with _PUTIMAGE and XOR plus issue loading PNG files [FIXED]
« Reply #16 on: August 16, 2018, 09:10:04 pm »
just out of curiosity why can is there no posting to the BUGs section?

Odin moves posts which end up reporting real bugs in QB64 to that board after some discussion takes place, cause sometimes it’s just cases where something was overlooked by the user.

4- you forgot about part 2, why wouldn't the current 'stable' build load the PNG?
There has been an image library replacement recently. Please check if the development build will load your png before we can discuss it further.

Gotcha, trying that now..

sure enough the latest DB works fine.

Good to hear the latest dev build has your png issue solved.