Hi,
Sorry to trouble you
what does this mean..
1. rolling your own library (instead of using a
third-party library)
2.nearest neighbor scaling
Thomas Hruska <[EMAIL PROTECTED]> wrote:
s_rafib4u wrote:
> Hi,
> Here i am sending the code for scaling the image and saving the
> scaled image into another file .I think till scaling is fine and
> after that the problem occurs can u please find me the solution how
> to save the scaled image..
>
> hoping for a sooner reply..
>
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <dos.h>
> #include <mem.h>
What's up with dos.h? Are you using the _ancient_ Turbo C compiler?
Also, I see you opted for rolling your own library (instead of using a
third-party library) and implemented a nearest neighbor scaling
algorithm. While simple to do, nearest neighbor generates ugly results.
> if ((fp = fopen(file,"rb")) == NULL)
> fp=fopen("output.bmp","w+");
Most obvious problem: You are writing out the target bitmap file as a
text file. Use:
fp = fopen("output.bmp", "wb");
Instead.
You should be using a hex editor to confirm the output of your file to
make sure it conforms to the "specification".
--
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197
*NEW* VerifyMyPC 2.5
Change tracking and management tool.
Reduce tech. support times from 2 hours to 5 minutes.
http://www.CubicleSoft.com/VerifyMyPC/
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
[Non-text portions of this message have been removed]