colour ramp
Is there an easy way to put a colour ramp at the side or at the bottom of an image?


0
Best Answer
-
Paul,
Yes, you can create a ramp image and just paste it to any image.
A ramp image can be created by macro:Public Sub CreateGrayRampImage Dim im As McImage=ThisApplication.Images.Add("",256,2) For i As Integer=0 To 255 im.PutPixel(i,i,0) im.PutPixel(i,i,1) Next im.Geometry.Resize(256,32,MediaCy.IQL.Operations.mcSmoothing.mcsmNone) End Sub
then you can resize it to desired dimensions, copy to clipboard and paste to the source image (optionally extending canvas). Note, that you should set "Source blend percentage" on the Paste page of the application options to 100.
Then apply Pseudo-color. Here is a sample result:
Yuri
0
Answers
-
Hi Paul,
IP Premier has Surface Plot view, that can show color legend:
You can also set XY projection, Orthogonal view, so you get simple XY view with color ramp:
Let me know if that will work for you.
Yuri0 -
Thanks for the suggestion - I didn't know that function existed. But I really need a smooth colour ramp. I guess I can create the colour ramp as a separate image then add it along side of the image using the image canvas to make some room.0
-
thanks Yuri - this is what I need.0
-
Hi Yuri - thanks for the code snippet to create a ramp image. I created a new app and ran the code but I get the attached error from im.PutPixel(i,i,0). Any ideas?
Private Sub button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button1.Click Dim im As McImage=ThisApplication.Images.Add("",256,2) For i As Integer=0 To 255 im.PutPixel(i,i,0) ' error from this line im.PutPixel(i,i,1) Next im.Geometry.Resize(256,32,MediaCy.IQL.Operations.mcSmoothing.mcsmNone) End Sub
0 -
Paul,
Be sure that you app has "Optimizer On" option and also proper references and Imports.
If you can't find the problem, send me your IPX file.
Yuri
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions