Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

[ad_1]

I wish to be sincere… I’ve already requested this query in a distinct (extra detailed) type on Stack Overflow, however sadly i have never obtained a helpful reply but:
https://stackoverflow.com/q/77469824/22902214

I have been engaged on a 2D sport for a while and there must also be an editor in it. A deliberate a part of it is a sprite cutter, which breaks down sprite sheets into adjustable particular person components and saves them (additionally with colour keying if needed) as a png file.

Nonetheless, we’d like the pixel knowledge of the feel (which is SDL_TEXTUREACCESS_TARGET) in an effort to convert it into an SDL_Surface to put it aside. This may solely be finished with SDL_RenderReadPixels().

For some purpose that I do not know (Android? / Pill-{Hardware}?), the SDL_RenderReadPixels perform would not give me any pixels with usable colour values. I’ve actually tried all the things possible to alter that.

Right here you see authentic colours:
Original color

That is what i get after SDL_RenderReadPixels():
After SDL_RenderReadPixels

And right here i attempted to repair the colours with my rearrangePixels methodology:
After i tried to fix the Colors

For the detailed code i exploit please click on on the hyperlink on the highest.

I can not proceed my mission that I’ve been engaged on for a number of years with out correcting this problem.

Assist!

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *