Creating and Destroying Objects

## Commands for Images & Vectors

createImage(...)
  `createImage(x, y, width, height, ["name"]) -> string`

  Creates a new image frame on the current page and returns its name. The coordinates are given in the current measurement units of the document. "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.

  May raise NameExistsError if you explicitly pass a name that's already used.

deleteObject(...)
  `deleteObject(["name"])`

  Deletes the item with the name "name". If "name" is not given the currently selected item is deleted.

loadImage(...)
  `loadImage("filename" [, "name"])`

  Loads the picture "picture" into the image frame "name". If "name" is not given the currently selected item is used.

  May raise WrongFrameTypeError if the target frame is not an image frame

getImageFile(...)
  `getImageFile(["name"]) -> string`

  Returns the filename for the image in the image frame. If "name" is not given the currently selected item is used.

setScaleFrameToImage(...)
  `setScaleFrameToImage([name])`

  Set frame size on the selected or specified image frame to image size.

  May raise WrongFrameTypeError.

setScaleImageToFrame(...)
  `setScaleImageToFrame(scaletoframe, proportional=None, name=<selection>)`

  Sets the scale to frame on the selected or specified image frame to `scaletoframe'. If `proportional' is specified, set fixed aspect ratio scaling to `proportional'. Both `scaletoframe' and `proportional' are boolean.

  May raise WrongFrameTypeError.

getImageScale(...)
  `getImageScale(["name"]) -> (x,y)`

  Returns a (x, y) tuple containing the scaling values of the image frame "name". If "name" is not given the currently selected item is used.

setImageScale(...)
  `setImageScale(x, y [, "name"])`

  Sets the scaling factors of the picture in the image frame "name". If "name" is not given the currently selected item is used. A number of 1 means 100 %. Scaling factors are equal to the values shown on properties palette.

  May raise WrongFrameTypeError if the target frame is not an image frame

getImageOffset(...)
  `getImageOffset(["name"]) -> (x,y)`

  Returns a (x, y) tuple containing the offset values in point unit of the image frame "name". If "name" is not given the currently selected item is used.

setImageOffset(...)
  `setImageOffset(x, y [, "name"])`

  Sets the position of the picture in the image frame "name". If "name" is not given the currently selected item is used. The specified offset values are equal to the values shown on properties palette when point unit is used.

  May raise WrongFrameTypeError if the target frame is not an image frame

placeEPS(...)
  ``

  placeEPS("filename", x, y) Places the EPS "filename" onto the current page, x and y specify the coordinate of the topleft corner of the EPS placed on the page If loading was successful, the selection contains the imported EPS

placeODG(...)
  ``

  placeODG("filename", x, y) Places the ODG "filename" onto the current page, x and y specify the coordinate of the topleft corner of the ODG placed on the page If loading was successful, the selection contains the imported ODG

placeSVG(...)
  ``

  placeSVG("filename", x, y) Places the SVG "filename" onto the current page, x and y specify the coordinate of the topleft corner of the SVG placed on the page If loading was successful, the selection contains the imported SVG

placeSXD(...)
  ``

  placeSXD("filename", x, y) Places the SXD "filename" onto the current page, x and y specify the coordinate of the topleft corner of the SXD placed on the page If loading was successful, the selection contains the imported SXD

savePageAsEPS(...)
  `savePageAsEPS("name")`

  Saves the current page as an EPS to the file "name".

  May raise ScribusError if the save failed.