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
2 answers

How to store an image in a variable

I would like to store the image generated by matplotlib in a variable raw_data to use it as inline image. import os import sys os.environ['MPLCONFIGDIR'] = '/tmp/' import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt print…
Ramya
  • 6,405
  • 5
  • 23
  • 23
22
votes
5 answers

How to set background image in Java?

I am developing a simple platform game using Java using BlueJ as the IDE. Right now I have player/enemy sprites, platforms and other items in the game drawn using polygons and simple shapes. Eventually I hope to replace them with actual images. For…
Dew
  • 245
  • 1
  • 3
  • 8
22
votes
1 answer

How to remove watermark background in image Python

I have a image like below, I would like to remove background watermark. So far I tried, inpainting method in opencv. It didn't help me. I tried following script: edges = cv2.Canny(img,50,150,apertureSize = 3) dst =…
Mohamed Thasin ah
  • 10,754
  • 11
  • 52
  • 111
22
votes
3 answers

Image size taken from Flutter Image_Picker plugin is way too big

I want to use auto-focus on the camera, which is available on the image_picker plugin. However, when I call: var bytes = new File(imagePath); var enc = await bytes.readAsBytes(); print(enc.length); I got: 5121126 which takes at least 10 seconds…
Dai Dao
  • 327
  • 1
  • 2
  • 8
22
votes
6 answers

vertical align center image in fixed size div

I have a div which is 145px X 145px. I have an img inside this dive. The img could be of any size (longest side being 130px). I would like the image to be centered vertically in the div. Everything that I have tried works in most browsers, but not…
David
  • 16,246
  • 34
  • 103
  • 162
22
votes
4 answers

Cancel single image request in html5 browsers

I'm loading (large) images dynamically to draw into a html5 canvas, something like this: var t = new Image(); t.onload = ... t.src = 'http://myurl'; But every once in a while would like to cancel the image request completely. The only way I came up…
Amir
  • 4,131
  • 26
  • 36
22
votes
4 answers

Most efficient way to display a 1x1 GIF (tracking pixel, web beacon)

I'm building a basic analytics service, based in theory off of how Google Analytics works, but instead of requesting an actual image, I'm routing the image request to a script that accepts the data and then outputs an image. Since browsers will be…
Yahel
  • 37,023
  • 22
  • 103
  • 153
22
votes
10 answers

How to Show an Local image till the NetworkImage() Loads Up in flutter?

new CircleAvatar( backgroundColor: Colors.black87, backgroundImage: new NetworkImage(url), radius: 45.0, ) I Want to…
Ajay Kumar
  • 15,250
  • 14
  • 54
  • 53
22
votes
8 answers

How to convert a byte array into an image?

Using Javascript, I'm making an AJAX call to a WCF service, and it is returning a byte array. How can I convert that to an image and display it on the web page?
KevinDeus
  • 11,988
  • 20
  • 65
  • 97
22
votes
4 answers

how do i use image sprites in GWT?

I was trying to use a tiled image in an image resource, and i was refering to the GWT tutorial for it... one section says you need to use sprites: http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#ImageResource repeatStyle is…
Salvin Francis
  • 4,117
  • 5
  • 35
  • 43
22
votes
3 answers

Cleaning up captcha image

I'm trying to clean up the image above I've tried several different methods using open cv, I either erode the original image too much to the point where parts of the letters become missing such as below: I'm not really sure sure how to get rid of…
user3191569
  • 485
  • 1
  • 7
  • 24
22
votes
2 answers

Use wpf image control to show an image from filesystem

I want to show an image from a file using an wpf image control. The image file resides in the application directory. The file dashboard.jpg should be replaceable during or after deployment. How do I…
PVitt
  • 11,500
  • 5
  • 51
  • 85
22
votes
2 answers

docker - Restrictions regarding naming image

I have questions regarding restrictions about naming images. I search online and saw different issue and answers. which special characters are not allowed in docker image name? (e.g. '*', '$', ',', '_' ...) Is it possible to use uppercase char for…
drorbr
  • 221
  • 1
  • 2
  • 4
22
votes
4 answers

flip and rotate a color image in MATLAB

How do I flip a color image (RGB) in MATLAB? The fliplr does not seem to work without losing the color contents, as it only deals with 2D. As well, the imrotate may not rotate color images.
Ursa Major
  • 851
  • 7
  • 25
  • 47
22
votes
10 answers

"Not allowed to load local resource" for Local image from Remote page in PhoneGap Build

I'm hosting my webpages for a phonegap build app. I'd like to use the camera to upload a photo, and show a preview the image, basically doing this:
Nico Westerdale
  • 2,147
  • 1
  • 24
  • 31