Faker C++
Loading...
Searching...
No Matches
image.h File Reference
#include <optional>
#include <string>
#include <string_view>
#include "faker-cxx/export.h"
Include dependency graph for image.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  faker
 
namespace  faker::image
 

Enumerations

enum class  faker::image::ImageCategory {
  faker::image::Animals , faker::image::Business , faker::image::Cats , faker::image::City ,
  faker::image::Food , faker::image::Nightlife , faker::image::Fashion , faker::image::People ,
  faker::image::Nature , faker::image::Sports , faker::image::Technics , faker::image::Transport
}
 

Functions

FAKER_CXX_EXPORT std::string faker::image::imageUrl (unsigned width=640, unsigned height=480)
 Generates a random image url with `https://loremflickr.com/` or "https://picsum.photos".
 
FAKER_CXX_EXPORT std::string faker::image::urlLoremFlickr (unsigned width=640, unsigned height=480, std::optional< ImageCategory > category=std::nullopt)
 Generates a real image url with `https://loremflickr.com/`.
 
FAKER_CXX_EXPORT std::string faker::image::urlPicsumPhotos (unsigned width=640, unsigned height=480, std::optional< bool > greyscale=std::nullopt, std::optional< int > blur=std::nullopt)
 Generates a real image url with "https://picsum.photos" .
 
FAKER_CXX_EXPORT std::string faker::image::githubAvatarUrl ()
 Generates a random avatar from GitHub.
 
FAKER_CXX_EXPORT std::string faker::image::dimensions ()
 Generates a random image dimensions.
 
FAKER_CXX_EXPORT std::string_view faker::image::type ()
 Generates a random type of image.