#### Archived

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.

## 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 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 on other sites
Thats it? Well at least that little bit of knowledge will help me out as I figure out its source.

Thanks =)

1. 1
Rutin
19
2. 2
3. 3
JoeJ
15
4. 4
5. 5

• 22
• 19
• 11
• 13
• 17
• ### Forum Statistics

• Total Topics
631698
• Total Posts
3001768
×