I think you can use Edit - Export Graphics...
This copies the window to the clipboard, with annotations (at least it did for me when I tried just now).
Thanks Kurt (sorry for the late reply!).
I didn't know about "Export Graphics" and the clipboard option, but I want to do this programmatically (adding scale bar information to a bunch of microscopy images), so pasting the image somewhere will be the problem.
With "Save Graphics" I incorrectly thought I don't preserve the image dimensions but a preceding
ChrLie wrote:
With "Save Graphics" I incorrectly thought I don't preserve the image dimensions but a preceding
ModifyGraph margin=-1
does the trick.
Well, actually no it doesn't.
To be more specific: Considering the following (example-) annotation function:
function AnnotationTest(width)
variable width
variable height = round(width*3/4)
//make image
Make/O/W/U/N=(width, height) M_Image = abs(enoise(65535))
Duplicate/FREE/O M_Image ScaleBar
//Make scale bar 10% of image height
Redimension/N=(width, round(height/10), -1) ScaleBar
ScaleBar = 0
variable ScaleHeight = DimSize(ScaleBar, 1)
variable textheight = (height+ScaleHeight/2)/(height+ScaleHeight)
Concatenate/O/NP=1 {M_Image,ScaleBar}, M_ImageScaled
NewImage/K=1 M_ImageScaled
ModifyGraph margin=-1
// add some text
SetDrawEnv textrgb= (65535,65535,65535),textxjust= 1,textyjust= 1,fstyle= 2, fname ="Arial", fsize = round(ScaleHeight*0.3)
DrawText 0.5, TextHeight ,"...noisy image...."
// add e.g. scale bar, magnification etc…..
end
and executing:
AnnotationTest(1024)
SavePICT/O/E=-7 as "Annotated.TIF"
saves an images with a width of 1052 pixel instead of 1024 to disk. I tried playing with the /RES and /B flag, but unsuccessfully. Is there any way to annotate but not changing the image width upon saving? ImageSave does it, but then the text is gone.
EDIT:
I just realize this seems to be more an issue related to
NewImage
….. but still makes me wonder how to get an annotated image with the exact image width.
This copies the window to the clipboard, with annotations (at least it did for me when I tried just now).
Alternatively there is File - Save Graphics...
Hope this helps.
Regards,
Kurt
July 25, 2014 at 07:36 am - Permalink
I didn't know about "Export Graphics" and the clipboard option, but I want to do this programmatically (adding scale bar information to a bunch of microscopy images), so pasting the image somewhere will be the problem.
With "Save Graphics" I incorrectly thought I don't preserve the image dimensions but a preceding does the trick.
August 7, 2014 at 08:34 am - Permalink
Well, actually no it doesn't.
To be more specific: Considering the following (example-) annotation function:
and executing:
saves an images with a width of 1052 pixel instead of 1024 to disk. I tried playing with the /RES and /B flag, but unsuccessfully. Is there any way to annotate but not changing the image width upon saving? ImageSave does it, but then the text is gone.
EDIT:
I just realize this seems to be more an issue related to ….. but still makes me wonder how to get an annotated image with the exact image width.
September 4, 2014 at 09:05 am - Permalink