Questions tagged [image]

The image tag is for questions related to the loading, formatting, saving, compression, and display of images in the context of source code. This tag should also be used for assistance using various image libraries. Questions about specific image formats should include the tags for those formats. Include tags to mention if the question relates to format conversion, processing, etc.

The image tag is for questions related to the loading, formatting, saving, compression, and display of images in the context of source code. Images are typically rendered as a two dimensional matrix of pixels for the case of gray-scale images, or a multidimensional matrix of pixels in the case of color images (, , etc). These may be stored in a variety of formats such as , , , , , and others (See Image file formats for further information).

Where appropriate, include tags that classify the type of question, such as , , etc.


References

113505 questions
22
votes
6 answers

Efficiency of services like Cloudinary, Imgix

I want to build a website with a lot of images and hence image manipulations like amazon, ebay, flipkart,etc. I have been suggested to use services like Cloudinary, Imgix, etc to resize my images since it would be better to store one version of each…
deadcode
  • 742
  • 11
  • 27
22
votes
2 answers

Why do BITMAPS load "upwards"?

If you have a really really large JPG and a BMP embedded on HTML and you load it into Firefox, you will notice that the JPG will load "downwards" (paint from left to right, then down) and the BMP will load "upwards" (paint from right to left, then…
Ian
  • 5,625
  • 11
  • 57
  • 93
22
votes
1 answer

How to pipe to a file (NodeJS)

I have created some image data which I've obtained from pixels. Anyway, now I would like to write a file using save-pixels, but the docs only give var savePixels = require("save-pixels") ... savePixels(pixels, "png").pipe(process.stdout) How to…
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
22
votes
2 answers

How do I use a new Image() in react

I am trying to keep an image from reloading when the state changes. The below image variable is passed into the props of a custom react component. var img = new Image(); I've already set the src, title, desc, etc. So my question is. In the…
Heath
  • 1,021
  • 3
  • 12
  • 19
22
votes
2 answers

Display image of graph in TensorFlow?

I wrote a simple script to calculate the golden ratio from 1,2,5. Is there a way to actually produce a visual through tensorflow (possibly with the aid of matplotlib or networkx) of the actual graph structure? The doc of tensorflow is pretty…
O.rka
  • 29,847
  • 68
  • 194
  • 309
22
votes
2 answers

SVG image with CMYK colours - is it possible?

Is it possible to specify that as SVG image should produce output in CMYK? If so, is it a big task? What if the image has its colours specified in RGB, is it difficult to convert them to CMYK?
DaveDev
  • 41,155
  • 72
  • 223
  • 385
22
votes
3 answers

How Does Facebook Know What Image To Parse Out of An Article?

First off I want to say that I wasn't really sure where to post this but it is very much programming related. If it is in the wrong spot I apologize and please let me know where I should post it instead. When sharing an article on a friends wall,…
Travis
  • 7,391
  • 12
  • 43
  • 52
22
votes
1 answer

Resizing the image with padding using convert on ubuntu

I am using the convert command for resizing the image There are two versions Following is the first one, the resultant image maintains the aspect ratio but the image does not necessarily be of size nxn convert temp.jpg -resize nxn temp.jpg The…
Shan
  • 18,563
  • 39
  • 97
  • 132
22
votes
2 answers

Fill SVG path element with a background image without tiling or scaling

I'd like to do something very much like Fill SVG path element with a background-image except that the solution offered there will tile the image to fill the the entire background area. I don't want that. If the image doesn't fill either the entire…
Michael
  • 325
  • 1
  • 3
  • 9
22
votes
5 answers

combining two png files in android

I have two png image files that I would like my android app to combine programmatically into one png image file and am wondering if it is possible to do so? if so, what I would like to do is just overlay them on each other to create one file. the…
John
  • 1,889
  • 6
  • 19
  • 26
22
votes
5 answers

Crop an image instead of stretching it

When I insert an image in a container with fixed width and height, the image stretches to fit that space. Is there a way to display the image at its normal size, but with the excess clipped out?
amit
  • 10,133
  • 22
  • 72
  • 121
22
votes
12 answers

What's an efficient way to tell if a bitmap is entirely black?

I'm wondering if there's a super-efficient way of confirming that an Image object references an entirely black image, so every pixel within the bitmap is ARGB(255, 0, 0, 0). What would you recommend? Most of these bitmaps will be 1024 x 6000 pixels…
Matt Brindley
  • 9,739
  • 7
  • 47
  • 51
22
votes
3 answers

How to detect a shift between images

I am analyzing multiple images and need to be able to tell if they are shifted compared to a reference image. The purpose is to tell if the camera moved at all in between capturing images. I would ideally like to be able to correct the shift in…
SFBA26
  • 870
  • 3
  • 12
  • 24
22
votes
4 answers

Gaussian blurring with OpenCV: only blurring a subregion of an image?

Is it possible to only blur a subregion of an image, instead of the whole image with OpenCV, to save some computational cost? EDIT: One important point is that when blurring the boundary of the subregion, one should use the existing image content as…
xuhdev
  • 8,018
  • 2
  • 41
  • 69
22
votes
3 answers

Bootstrap 3 profile image in navbar

How do I get the profile image (see picture) to be say 25/30px without distorting the navbar? This is what I have now: