Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


2xSAI engine, can anyone explain it to me?

This topic is 6055 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I've been looking into the 2xSAI engine, and I've got the source code, just I can't really understand the theory behind it. Heres what I've gotten from the readme How does it work? ----------------- 2xSaI doesn't use conventional methods to scale images. 2xSaI detects certain color patterns (actually just lines and edges) in the original bitmap. A 2x scaled image has 4 times the amount of pixels of the original one. Of those one is directly taken from the source bitmap. The other 3 pixels are "guessed", using the patterns I mentioned earlier. A better document describing how 2xSaI works has yet to be written (when this 17 year old has some more time)... I'm wondering if anyone can explain it better to me... I don't need complicated math or formulas, I'm just more or less looking for a some details on what steps are taken and how they relate to the final image... Thanks in advance... Oh, and one other thing.. it's lmost christmas can anyone recommend a graphics programming book that would feature 2xSAI, the eagle engine, dithering and other concepts related to 2D graphics? Edited by - Tricron2 on December 10, 2001 10:54:51 PM

Share this post

Link to post
Share on other sites
Nah, it''s not using any complicated math at all...
it only checks if the colour of the pixel being drawn matches any of the 8 pixels that surround it - and depending on the pattern of such colour matches, the scaled pixel will be drawn differently.

Just a bunch of if statements or switch should be enough to program a simple 2xsai engine.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!