/// <summary> /// Return the URL for the image of a work. /// </summary> /// <param name="sWorkID">The ID of the work.</param> /// <param name="cropping">The type of cropping to apply.</param> /// <param name="size">The size of the image.</param> /// <returns>The URL for the image.</returns> public static Uri WorkImageURL( string sWorkID, ArtCropping cropping, ArtSize size ) { return WorkImageURL( sWorkID, cropping, size, ArtView.Main ); }
/// <summary> /// Return the URL for the image of a work. /// </summary> /// <param name="sWorkID">The ID of the work.</param> /// <param name="cropping">The type of cropping to apply.</param> /// <param name="size">The size of the image.</param> /// <param name="view">The type of view to use.</param> /// <returns>The URL for the image.</returns> public static Uri WorkImageURL( string sWorkID, ArtCropping cropping, ArtSize size, ArtView view ) { return WorkImageURL( sWorkID, cropping, size, view, "" ); }
/// <summary> /// Return the URL for a laminated print preview image. /// </summary> /// <param name="sWorkID">The ID of the work.</param> /// <param name="border">The border to use for the print.</param> /// <param name="size">The size of the laminated print.</param> /// <returns>The URL of a laminated print preview of the work.</returns> public static Uri LaminatedPrintPreviewURL( string sWorkID, BorderColour border, ArtSize size ) { return WorkImageURL( sWorkID, ArtCropping.None, size, ArtView.Preview, "product:" + RBEnums.ToURL( ArtProduct.LaminatedPrint ) + "/" + "border:" + RBEnums.ToURL( border ) + "/" ); }
/// <summary> /// Return the URL for the image of a work. /// </summary> /// <param name="sWorkID">The ID of the work.</param> /// <param name="cropping">The type of cropping to apply.</param> /// <param name="size">The size of the image.</param> /// <param name="view">The type of view to use.</param> /// <param name="sExtras">Any extra bits of path you want to add before the file.</param> /// <returns>The URL for the image.</returns> public static Uri WorkImageURL( string sWorkID, ArtCropping cropping, ArtSize size, ArtView view, string sExtras ) { return new Uri( RBImageServer( sWorkID ) + "img/art/" + ( cropping == ArtCropping.Cropped ? "cropped/" : "" ) + "size:" + RBEnums.ToURL( size ) + "/" + "view:" + RBEnums.ToURL( view ) + "/" + sExtras + sWorkID + ".jpg" ); }
/// <summary> /// Return the URL for a framed print preview image. /// </summary> /// <param name="sWorkID">The ID of the work.</param> /// <param name="frame">The colour of the frame.</param> /// <param name="matte">The colour of the matte.</param> /// <param name="size">The size of the framed print.</param> /// <returns>The URL of a framed print preview of the work.</returns> public static Uri FramedPrintPreviewURL( string sWorkID, FrameColour frame, MatteColour matte, ArtSize size ) { return WorkImageURL( sWorkID, ArtCropping.None, size, ArtView.Preview, "product:" + RBEnums.ToURL( ArtProduct.FramedPrint ) + "/" + "framestyle:flat30/" + "framecolor:" + RBEnums.ToURL( frame ) + "/" + "mattecolor:" + RBEnums.ToURL( matte ) + "/" ); }