Skip to content

Image-core v1.0.2

Compare
Choose a tag to compare
@MasterpaintSu MasterpaintSu released this 18 Feb 22:32
· 89 commits to main since this release
8023075

In this new version we have only fixed a couple of bugs and we have also added 12 new images to the api so at the moment there are only 36 images available and soon we will add more than +20 images.

// downloadImageExample.js

// Import the function downloadRandomImage from index.mjs file
import { downloadRandomImage } from 'imagen-core';

// Calling the downloadRandomImage function to download an image
async function exampleDownloadRandomImage() {
  try {
    await downloadRandomImage();
    console.log('Image downloaded successfully.');
  } catch (error) {
    console.error('Error downloading the image:', error);
  }
}

// Execute the example
exampleDownloadRandomImage();