Board index » cppbuilder » fast hue

fast hue


2003-07-20 01:57:27 AM
cppbuilder41
Hi!
I've looking for a very fast Hue which can be found in Photoshop.
I don't know how to write a fast one. I only could wrote a Hue which
converts each pixel one by one rgb->hue (&modify something) ->rgb. This is
VERY slow. Maybe
somehow is it possible to create a Lookuptable or any trick?
Cheers
Zoltan Komaromy
www.komaromy.com
 
 

Re:fast hue

use the SCANLINE Pointer of the TBitmap..
and perform the code directly on the image memory,
Gipsz Jakab wrote:
Quote
Hi!

I've looking for a very fast Hue which can be found in Photoshop.

I don't know how to write a fast one. I only could wrote a Hue which
converts each pixel
one by one rgb->hue (&modify something) ->rgb. This is VERY slow. Maybe
somehow is it possible to create
a Lookuptable or any trick?

Cheers
Zoltan Komaromy
www.komaromy.com
 

Re:fast hue

Thank you but my problem is not that.
I use gr32 library with scanline. The bottleneck is the conversion
what I want to speed up somehow. I want HUE shift as fast as in
Photoshop.
Cheers
Zoltan
"Maynard Philbrook" < XXXX@XXXXX.COM >az alábbiakat írta a
következo üzenetben news: XXXX@XXXXX.COM ...
Quote
use the SCANLINE Pointer of the TBitmap..
and perform the code directly on the image memory,


Gipsz Jakab wrote:

>Hi!
>
>I've looking for a very fast Hue which can be found in Photoshop.
>
>I don't know how to write a fast one. I only could wrote a Hue which
>converts each pixel
>one by one rgb->hue (&modify something) ->rgb. This is VERY slow. Maybe
>somehow is it possible to create
>a Lookuptable or any trick?
>
>Cheers
>Zoltan Komaromy
>www.komaromy.com

 

{smallsort}

Re:fast hue

because the gr32 lib is using scanline does not mean its code is efficient.
if your going to shift the whole image then you simple get the pointer to the
starting line of memory which is the last line and then simple increment the
pointer until you reach the last value changing it on its way..
to determine the number bytes you need to round up to the nearest dword
boundry perline * numberof lines.
Gipsz Jakab wrote:
Quote
Thank you but my problem is not that.
I use gr32 library with scanline. The bottleneck is the conversion
what I want to speed up somehow. I want HUE shift as fast as in
Photoshop.

Cheers
Zoltan

"Maynard Philbrook" < XXXX@XXXXX.COM >az alábbiakat írta a
következo üzenetben news: XXXX@XXXXX.COM ...
>use the SCANLINE Pointer of the TBitmap..
>and perform the code directly on the image memory,
>
>
>Gipsz Jakab wrote:
>
>>Hi!
>>
>>I've looking for a very fast Hue which can be found in Photoshop.
>>
>>I don't know how to write a fast one. I only could wrote a Hue which
>>converts each pixel
>>one by one rgb->hue (&modify something) ->rgb. This is VERY slow. Maybe
>>somehow is it possible to create
>>a Lookuptable or any trick?
>>
>>Cheers
>>Zoltan Komaromy
>>www.komaromy.com
>