Audio to text Note that this feature is only available in NIM. Chat room has not yet implemented this feature.
apply Gaussian blurring
Gaussian blurring radius
Gaussian blur standard deviation, cannot be less than 0
Original URL to the image stored in NOS
URL of the returned image
Crop an image
height, must be an integer
Original URL to the image stored in NOS
width, must be an integer
X coordinate, must be an integer
Y coordinate, must be an integer
URL of the returned image
Get the authentication token of the shortened URL.
URL to the file
Full accessible URL
Get the authentication token of the shortened URL to get the file.
URL to get the file
Full accessible URL
Shortened URL to full URL
interlace image
Original URL to the image stored in NOS
URL of the returned image
Upload and preview files. Send a file message by calling the method.
Process an image
This method receives a set of image operations, and processes the images in order of operations. The optional operations include:
For the parameters required for each operation, see the above methods. In addition to the parameters listed in the above methods, each operation needs to provide the operation types:
// Rotate after cropping
var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';
nim.processImage({
url: url,
ops: [
{
type: 'crop',
x: 100,
y: 0,
width: 250,
height: 250,
},
{
type: 'thumbnail',
mode: 'cover',
width: 80,
height: 80
}
],
done: processImageDone
});
function processImageDone(error, obj) {
console.log('Processing the image' + (!error?'success':'failure'), error, obj);
}
Operation sequence. Process images sequentially according to the order of operations. For the specific format, see the previous image processing interfaces
Similar effects
[ { type: 'crop', x: 100, y: 0, width: 250, height: 250, }, { type: 'thumbnail', mode: 'cover', width: 80, height: 80 } ]
URL of the returned image
Modify the image quality
Image quality, integer, value range: 0-100
Original URL to the image stored in NOS
URL of the returned image
Rotate an image
Rotation angle
Original URL to the image stored in NOS
URL of the returned image
Remove the metadata of an image
Generate the thumbnails of an image
'cover'
: The original image is scaled in proportion, one side of the thumbnail is equal to the requested size, and the other side is larger than the requested size, that is, the thumbnail can just cover the rectangle with the size of width*height'contain'
: The original image is proportional to the thumbnail, one side of the thumbnail is equal to the requested size, and the other side is larger than the requested size, that is, a rectangle with a size of width*height can just cover the thumbnail'crop'
: First get the thumbnail based on the original image proportionally so that one side is equal to the requested size and the other side is larger than the requested size, and then crop the side larger than the requested size so that the final image size is exactly equal to the requested size (Note: the crop
mode does not support thumbnails to GIFs)'crop'
mode, parameters axis.x or axis.y can be used to control the position of the last cropping step.Coordinates for cropping
X coordinate, must be an integer
Y coordinate, must be an integer
Height of an thumbnail
Original URL to the image stored in NOS
Width of an thumbnail
URL of the returned image
Cloud storage APIs for uploading and processing files.