Extracting image from Phab

We had an artist create an image in a PtLabel (230 by 830 pixels) and it
looks great. We want to use this image in our manuals but cannot find a way
of getting it out of the PtLabel, prefferably into bitmap form so we can get
it into a word processor. There is an Import button on the pixelmap editor
but no Export.

Any help would be welcome
Steve

Stephen F Terrell <stephen@trsystem.demon.co.uk> wrote:
: We had an artist create an image in a PtLabel (230 by 830 pixels) and it
: looks great. We want to use this image in our manuals but cannot find a way
: of getting it out of the PtLabel, prefferably into bitmap form so we can get
: it into a word processor. There is an Import button on the pixelmap editor
: but no Export.

How about the snapshot utility? It’s the camera icon in PDM’s Utilities tab.
Choose BMP Spool File as the printer.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Here is a way to grab a pic from your PtLabel

int PxWriteImage( char *filename, PhImage_t *image, PxMethods_t *methods, int iformat, int itype );

-Where methods can be NULL
-iformat is:
PX_IMAGE_BMP
PX_IMAGE_GIF
PX_IMAGE_JPG
PX_IMAGE_PCX
PX_IMAGE_TGA
PX_IMAGE_PNG
PX_IMAGE_TIFF

-itype can be:
PX_NORMAL
PX_IMAGE
PX_PALETTE
PX_METHODS
(Refer to px_alloc from the PxLoadImage() function) - (I use PX_PALETTE)


{
PtArg_t args[1];
PhImage_t *the_image;

PtSetArg( &args[0], Pt_ARG_LABEL_DATA, the_image, sizeof( the_image ) );
PtGetResources( ABW_label_widget, 1, args );
PxWriteImage( “/home/joe/mypic.gif”, the_image, NULL, PX_IMAGE_GIF, PX_PALETTE );
}

Good Luck

Charles Lawrence



Previously, Steve Reid wrote in qdn.public.qnx4.photon:

Stephen F Terrell <> stephen@trsystem.demon.co.uk> > wrote:
: We had an artist create an image in a PtLabel (230 by 830 pixels) and it
: looks great. We want to use this image in our manuals but cannot find a way
: of getting it out of the PtLabel, prefferably into bitmap form so we can get
: it into a word processor. There is an Import button on the pixelmap editor
: but no Export.

How about the snapshot utility? It’s the camera icon in PDM’s Utilities tab.
Choose BMP Spool File as the printer.


Steve Reid > stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Thanks all
Steve

Previously, Steve Reid wrote in qdn.public.qnx4.photon:

Stephen F Terrell <> stephen@trsystem.demon.co.uk> > wrote:
: We had an artist create an image in a PtLabel (230 by 830 pixels) and it
: looks great. We want to use this image in our manuals but cannot find a way
: of getting it out of the PtLabel, prefferably into bitmap form so we can get
: it into a word processor. There is an Import button on the pixelmap editor
: but no Export.

How about the snapshot utility? It’s the camera icon in PDM’s Utilities tab.
Choose BMP Spool File as the printer.


Steve Reid > stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

I’ve been using Snap Shot for exactly the same task. It works pretty well, but I’ve noticed one flaw. It sometimes fails to capture button outlines (specifically rounded buttons). I assume this bug is a side-effect of the intelligent interpretting Snap Shot does of the widgets it’s looking at. Is there a way to get Snap Shot to create a raw, pixel-for-pixel dump of the contents of a window… like “xwd”?

TIA,

  • Pete

Charles Lawrence <clawrence@qnx.com> wrote:
: Here is a way to grab a pic from your PtLabel

: int PxWriteImage( char *filename, PhImage_t *image, PxMethods_t *methods, int iformat, int itype );

Note that PxWriteImage() is unsupported and not documented.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems