Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
bltting images quickly in C
Consider the code below written in C for bltting images
I am writing a graphics library for mode 13h (320x200x256)
for(y=0; y<diff_y; y++)
for(x=0; x<diff_x; x++)
pixel = image_buffer[x];
if(pixel!=transprant) // tests for transprancy
video_buffer[xs] = pixel;
there is some more code that does the clipping but this code actually performs bltting. B'cos i have to test for transprancy the inner loop is required which is really a overhead. Is there a way to optimize this fuction. I don't think we can use hardware accleration in DOS to perform bltting, like in DirectX's (Blt() function).
Is there any better / fast method to blt images.i don't know assembly language so i want to do it with C only.
0 · ·