All Projects β†’ mirzaevolution β†’ ThumbnailSharp

mirzaevolution / ThumbnailSharp

Licence: MIT license
A simple but awesome library to create a flexibel thumbnail from an image for .NET Framework 4.5+

Programming Languages

C#
18002 projects

Labels

Projects that are alternatives of or similar to ThumbnailSharp

FroshWebP
WebP Support for Shopware
Stars: ✭ 29 (+11.54%)
Mutual labels:  thumbnail
video-snapshot
Get snapshots from a video file in the browser πŸŽ₯ πŸŒ…
Stars: ✭ 63 (+142.31%)
Mutual labels:  thumbnail
YouTube-Thumbnail-Downloader
A youtube videos thumbnail downloader telegram bot.
Stars: ✭ 41 (+57.69%)
Mutual labels:  thumbnail
cakephp-glide
CakePHP plugin for using Glide image manipulation library
Stars: ✭ 34 (+30.77%)
Mutual labels:  thumbnail
media-command
Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
Stars: ✭ 40 (+53.85%)
Mutual labels:  thumbnail
lamba-thumbnailer
AWS S3 Video Thumbnailer with Lambda
Stars: ✭ 21 (-19.23%)
Mutual labels:  thumbnail
WebinoImageThumb
βœ‚οΈ Webinoβ„’ Image thumbnailer for Zend Framework [LTS] http://webino.github.io/WebinoImageThumb
Stars: ✭ 40 (+53.85%)
Mutual labels:  thumbnail
video thumbnail
This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
Stars: ✭ 159 (+511.54%)
Mutual labels:  thumbnail
Image
PHP Image Manipulation
Stars: ✭ 12,298 (+47200%)
Mutual labels:  thumbnail
Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (+6400%)
Mutual labels:  thumbnail
crops
πŸŒ„ Image thumbnail generation server
Stars: ✭ 37 (+42.31%)
Mutual labels:  thumbnail
react-shimmer-effects
Customizable Shimmer effects for React
Stars: ✭ 29 (+11.54%)
Mutual labels:  thumbnail
urlbox-screenshots-node
Capture website thumbnails using the urlbox.io screenshot as a service API in node
Stars: ✭ 14 (-46.15%)
Mutual labels:  thumbnail
hls-live-thumbnails
A service which will generate thumbnails from a live HLS stream.
Stars: ✭ 49 (+88.46%)
Mutual labels:  thumbnail
pdf2html
pdf2html is a module which helps to convert PDF file to HTML pages using Apache Tika. This module also helps to generate thumbnail image for PDF file using Apache PDFBox.
Stars: ✭ 55 (+111.54%)
Mutual labels:  thumbnail

ThumbnailSharp

A specialized library to create an image thumbnail from various sources with better result and supports different image formats. A Thumbnail is something that's not very important sometimes, but for softwares/web apps that require a thumbnail to be uploaded to their databases to be used later becomes so vital. And if we just need to create a simple thumbnail, why do we need a big image composition library that holds unnecessary methods for us? Here, we introduce a simple but powerful library for creating a nice thumbnail either from local or internet (supports async/await) that produces better result than Image.GetThumbnailImage Method from System.Drawing.dll. You can consume the result of operation either as an array of bytes or a stream.

Here are some samples:

Original Image (Landscape)

landscape-image

Thumbnail (Jpeg)

size is set to 250

landscape-image-thumbnail

size is set to 450

landscape-image-thumbnail

Original Image (Portrait)

portrait-image

Thumbnail (Jpeg)

size is set to 250

portrait-image-thumbnail

size is set to 450

portrait-image-thumbnail

Original Image (Square/Proportional)

square-image

Thumbnail (Jpeg)

size is set to 250

square-image

How does it work? Simple, you just need to pass thumbnail size (aspect ratio will be reserved), image source, and image format.

Get thumbnail from internet source

byte[] resultBytes = await new ThumbnailCreator().CreateThumbnailBytesAsync(
	thumbnailSize: 250,
    	urlAddress: new Uri("http://www.sample-image.com/image.jpg",UriKind.Absolute),
    	imageFormat: Format.Jpeg
);
// or
Stream resultStream = await new ThumbnailCreator().CreateThumbnailStreamAsync(
	thumbnailSize: 250,
    	urlAddress: new Uri("http://www.sample-image.com/image.png",UriKind.Absolute),
    	imageFormat: Format.Png
);

Get thumbnail from local source

byte[] resultBytes = new ThumbnailCreator().CreateThumbnailBytes(
	thumbnailSize: 300,
    	imageFileLocation: @"C:\images\image.bmp",
    	imageFormat: Format.Bmp
);
//or
Stream resultStream = new ThumbnailCreator().CreateThumbnailStream(
	thumbnailSize: 300,
    	imageFileLocation: @"C:\images\image.bmp",
    	imageFormat: Format.Bmp
);

Get thumbnail from image stream

byte[] resultBytes = new ThumbnailCreator().CreateThumbnailBytes(
	thumbnailSize: 300,
    	imageStream: new FileStream(@"C:\images\image.jpg",FileMode.Open,FileAccess.ReadWrite),
    	imageFormat: Format.Jpeg
);
//or
Stream resultStream = new ThumbnailCreator().CreateThumbnailStream(
	thumbnailSize: 300,
  	imageStream: new FileStream(@"C:\images\image.jpg",FileMode.Open,FileAccess.ReadWrite),
    	imageFormat: Format.Jpeg
);

Get thumbnail from image bytes

byte[] buffer = GetImageBytes(); //this is just fictitious method to get image data in bytes

byte[] resultBytes = new ThumbnailCreator().CreateThumbnailBytes(
	thumbnailSize: 300,
    	imageBytes: buffer,
    	imageFormat: Format.Gif
);
//or
Stream resultStream = new ThumbnailCreator().CreateThumbnailStream(
	thumbnailSize: 300,
    	imageBytes: buffer,
    	imageFormat: Format.Tiff
);

Take a look our softwares that were built using this library:

ThumbnailSharp.Clients


Ready to taste it?

Install from Nuget.Org

Install-Package ThumbnailSharp -Version 1.0.0

Created by: Mirza Ghulam Rasyid

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].