Aurigma Forums
»
Legacy Products
»
Archive
»
Other Products
»
HSL selective color adjustment Server Side
Rank: Member
Groups: Member
Joined: 11/11/2005(UTC) Posts: 9
|
Hello, I want to do a hue & saturation adjustment on a selective color on the server side. Files are 24 bit color, and about 600px x 600px. I've tested stepping through the Pixels(i, j) one by one and it is slow. Q: Can I use the CopyMemory function you suggest on the server side through ASP using JScript or VBScript? If not, any way to speed up the process on the server side using ASP?
Regards, Bobby Valentine
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Hello Bobby, I afraid there is no way to import WinAPI functions in VBScript/JScript. I can see two ways to avoid using Pixels property. - Wrap the necessary functionality in ActiveX control which you can write on VB6 or any other language. This approach used in the code sample which demonstrates how to handle Progress event in ASP.
- Get rid of per-pixel processing at all. If I understand you need to apply HSL processing only on a part of image. You can do it without per-pixel processing, if you manage to build a mask.
In last case the algorithm would be looking like this: - Get a mask (grayscale bitmap of the same size where black means transparent area, white - opaque one). For example, in your case you can use Transparentize method, extract alpha channel, and invert it.
- Create a copy of the bitmap apply HSL transform on it.
- Replace the alpha channel of modified bitmap by the mask.
- Blend this bitmap with the original one.
As a result you will get modified color in the areas which correspond to white areas of mask (marked by Transparentize), and original color for black areas. Hope this makes sense. Please feel free to post a message if something is unclear.
|
|
|
|
Aurigma Forums
»
Legacy Products
»
Archive
»
Other Products
»
HSL selective color adjustment Server Side
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.