Find Jobs
Hire Freelancers

Anti-aliased StretchBlt() / pure win32/x64 c++

$500-820 USD

Cancelled
Posted over 11 years ago

$500-820 USD

Paid on delivery
See detailed reqs. ## Deliverables Hello, Hopefully the title is self-explanatory: the aim is to produce a .cpp/.h pair (MSVC10) which declare and define a single function SmoothSB() which is a re-implementation of the win32 StretchBlt() GDI function with SRCCOPY passed as blt type. (Note there is no need nor desire to support any other type of blt except for SRCCOPY and the StretchBlt() parameter which is usually used to indicate the type of blt can and should be omitted. In addition you should also assume the following: 0a. Both source and destination HDCs passed to SmoothSB() will only ever have DIB-section HBITMAP objects selected into them, both 32 bits-per-pixel. 0b. The HDCs passed for source and destination may be the same object, i.e. it needs to be possible to blt from one part of an HDC to another. 0c. The project using the module will always have a file named "stdafx.h" that you should include before anything so that WINVER is defined correctly for instance. A further 'pre-consideration' is as follows: 0d. Do not include any error checking at all - none - except for _DEBUG builds by including <assert.h> and calling assert() with _DEBUG-only tests. If you use any auto/stack vars for this, enclose in an #ifdef _DEBUG...#endif block. Requirements: 1. Your SmoothSB() must cope with both up- and downwards scaling using the {x0, y0, cx0, cy0, x1, y1, cx1, cy1} params (all 32-bit signed ints) to determine any 'scale factor' either -ve or +ve as StretchBlt() does. 2. MOST IMPORTANT: The result of calling SmoothSB() must apply some kind of smoothing algorithm, anti-aliasing or ortherwise, as appropriate so that in all cases the result does not have any recognisable side-effects of stretching the source image. 2a. I am open to comments and suggestions as to how this might be accomplished. Note that the primary concern is that actual images, background colour/gradient and any simple shapes/lines look their best. Text should be made to look as good as possible but it is likely I will where possible re-draw any text anyway using an appropriately-scaled HFONT. 3. The function needs to be as fast as possible so where you might need to use random values for instance, don't call rand() or any other RNG function, pre-generate a suitable set of values and store them in a static array. 3a. Use similar approaches for anything else, including considerations such as loop unwinding (or just not including unnecessary loops in the first place). 4. Finally, the header file should only declare SmoothSB() and not contain any other definitions or declarations or pre-processor stuff. Keep all private data private by defining it as static in the .cpp 4a. (Obviously it's up to you if you use one or more classes in your implementation or some other approach. The key thing is that it should exist with file scope within your .cpp only.) Also, should be obvious but call your .cpp/.h [login to view URL] and SmoothSB.h respectively. That's it. Many thanks. * * *This broadcast message was sent to all bidders on Saturday Jul 21, 2012 6:41:14 AM: Note my reason for including the asm category is that provided you provide equivalent x64 bytecode, you can use inline asm (MSVC2010) OR simply use both x86- and x64 versions of the same machine-level bytecode, should there be a useful opportunity to gain a performance improvement by doing so.
Project ID: 2761458

About the project

3 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $550 USD for this job
User Avatar
See private message.
$575 USD in 28 days
5.0 (39 reviews)
6.1
6.1
User Avatar
See private message.
$650.25 USD in 28 days
4.8 (46 reviews)
5.5
5.5
User Avatar
See private message.
$425 USD in 28 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED KINGDOM
Leeds, United Kingdom
5.0
30
Payment method verified
Member since Mar 28, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.