FAQ Database Discussion Community


how to get Full Path if image to send to server by MultiPart in Android

android,image,filepath
In My App, user can take Picture from Camera Or Select from Gallery And Crop It to send to server. So there is No Problem., Problem is when user select picture from Gallery URI path from camera cropped : /mnt/sdcard/avatar_1434958340804.jpg URI path from Storage cropped : /external/images/media/19 Error: IOException :...

Saving images with more than 8 bits per pixel in matlab

image,matlab,image-processing,computer-vision
I need to save a set of pre-processing images in matlab, resulting in grayscale images. The problem is the fact that these pre-processed images have pixel values higher than 255. If I save them with imwrite() as, for instance, .PNG files, does matlab normalize the values to be in [0,255]...

in C#, changing background image of a button after click

c#,image,background,click
This code does not report any error and should have work.The button background image does not change. Any idea of what could be wrong? void MyHandler(object sender, EventArgs e, string val) { //Process Process.Start(@val); //Change button bkground image var button = (Button)sender; button.BackgroundImage = global::Test.Properties.Resources.impOK; } EDIT The event MyHandler...

load a thumbnail on QListWidget with reduced resolution

image,qt,qlistwidget,qlistwidgetitem
I need to reduce the resolution of the images that I add and show in a QListWidgtet. Now I use the next code but it does not show all the images because they are being loaded with full resolution void ImagesWizard::on_pbAddImages_clicked() { QFileDialog dialog(this); dialog.setDirectory(mInitPath); dialog.setFileMode(QFileDialog::ExistingFiles); dialog.setNameFilter(trUtf8("Images (*.jpg *.png *.tif...

Is it possible to get size of image file in Node.js?

node.js,image
I am using Node.js and i need to find the size of image file (.jpeg/.jpg/SWF)? There are tools that can tell dimensions but none which can tell file size? Are there any? If yes.Kindly tell

iOS UIImage: set image orientation without rotating the image itself

ios,image,uiimage,uiimageorientation
I am using AVCapture+camera portrait mode to capture an image. when I display the captured image, it is fine--looks fine. But when I convert to jpeg representation and then convert to base64 string to server and server stored it, it is "rotated" already. So I checked the image orientation before...

iText, FileNotFoundException when adding image to pdf

android,image,pdf,itext
I am trying to add an image to my pdf using iText and when following the iTexts documentation on this its just simply telling me to do this: Image img = Image.getInstance("res/drawable/toplogos.png"); document.add(img); But I am getting FileNotFoundException. Why is that? The file is in the drawable folder. Thanks....

Crop Image Located in Internal Storage

android,image,android-intent,crop,android-fileprovider
I am having trouble using the crop intent in Android. I am storing images in the internal storage allocation for my app and I want to be able to crop them and then set them as the wallpaper. I can get it to work with an image stored in external...

Adding an image to JPanel within JLabel

java,image,swing,imageicon
I'm new to Java, and I'm trying to make an JFrame, with a JPanel inside it and an image inside a JLabel. Then by adding the JLabel to the JPanel it must work right? However, this is the way it's done on docs.oracle.com... This is the code: import java.awt.BorderLayout; import...

Why do my images not display in my panels?

java,image,panel,frame
I want to set a background for my game. Scenario: First of all, I have to read from a text file, and then draw my tile map and images on it base on that texts. Second, my map is 3600*2400 pixels and it's larger than my screen so I have...

Create mask from bwtraceboundary in Matlab

image,matlab,image-processing,mask,boundary
I'm trying to create a mask (or similar result) in order to erase pieces of a binary image that are not attached to the object surrounded by the boundary. I saw this thread (http://www.mathworks.com/matlabcentral/answers/120579-converting-boundary-to-mask) to do this from bwboundaries, but I'm having trouble making suitable changes to it. My goal...

SDWebImage Library - placeholder from URL

ios,image,uitableview,asynchronous,sdwebimage
I'm using SDWebImage to download and cache images in an UITableView asynchronously but I'm having some problems. The scenario is the following: When the cell is created I want to load a low quality blurred image (1-2kb) from an URL, before the real image comes in. After the higher quality...

Images not loaded from master page in directory

asp.net,image
I will make a website whit ASP.NET using C# on the background. I have make my master page with the following image: <img src="afbeeldingen/berichten.png" alt="new messages" /> Because I have a lot of pages in my site, I have make directories in my solution. My problem is now when I...

ImageMagick - Making 2 GIFs into side by side GIFs using IM convert

image,unix,imagemagick,imagemagick-convert
I have 2 GIFs that are the same length. I want to put the GIFs beside each other to have 1 GIF with both playing at the same time. I have tried to use the convert tool with: convert +append 1.gif1 2.gif output.gif However, this seems to blend all the...

How to separate the patches in the image?

image,matlab,image-processing,computer-vision,vision
I want to initialize the dictionary of this image. The image is the same as this one: image source The size of the grey image is 320*512 double. I want to separate the 40 brain image patches in this grey image. I have two questions 1) how to get the...

Plotting image and points on Matlab GUI via update function

image,matlab,user-interface,graph,plot
excuse my noobness, but this is my first post. i generated this gui in matlab, and i want to plot an image on one of the axis from an update function. i know in Matlab you can just do something like image(img) hold on plot(x1,z1) hold off but how can...

Protect images download theory

javascript,html5,image,security
I am a full-time developer but am building a site for my photography hobby. I dont want people to download my images and besides the usual procedures (disable right click, block hotlinks to my images etc.) i was thinking about a solution which would work 99% of the time. The...

Javascript Render an Image from a Link

javascript,image,hyperlink
I'm working on something and my boss told me that our client needs a javascript that when put on their website in will generate or render the image from a certain link. Example Link. http://i.imgur.com/YmmSEz9.png Is that possible? I'm thinking that it is impossible because you will never know the...

Uploading PNG to Website Server

php,mysql,image,png
I have seen loads of other topics and I've tried them all. Can someone please help with why this script won't upload PNG files? Blank PNG image being displayed. $image = $_FILES['file']['tmp_name']; $image_name = $_FILES['file']['name']; $ext = pathinfo($image_name, PATHINFO_EXTENSION); $location = "Profiles/{$user}/Picture/{$image_name}"; $new_image = imagecreatetruecolor(100, 100); $source_image = imagecreatefrompng($image); imagealphablending($source_image,...

Dynamically resize side-by-side images with different dimensions to the same height

javascript,html,css,image
I have two images side-by-side within a block-level container with arbitrarily different dimensions (as in, they could be any two images) that I want to dynamically adjust the width of so that the overall height of the two images is the same. I don't think this can be done in...

Image Upload Strategy with Clusters And Amazon S3

php,image,amazon-s3
Trying to sort out a strategy to deal with uploaded images whose endpoint is Amazon S3. The goal is, upon upload, that the image is immediately visible. However, the current way of handling the situation is that the end-user uploads the image and then has to wait for it to...

Using raphael.js to draw an image with parameters sent through socket.io

javascript,image,socket.io,raphael
This is what I have tried so far. socket-server.js var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); var config = require('./config2.js'); app.get('/', function(req, res){ res.sendfile('socket-client.html'); }); io.on("connection", function (socket) { var mapRes = {width : 720, height: 1040}; socket.emit("mapRes", mapRes); }); http.listen(3000, function(){ console.log('listening on *:3000');...

Bandpass Filter in Python for Image Processing

python,image,opencv,image-processing,filtering
I have a noisy dataset (a stack of images) which films dim particles moving about some really bright artefacts (which are immobilized). I would like to somehow remove the immobilized artefacts from the images by applying some sort of bandpass filter wherein only pixels within a specific range are converted...

Java encode raw bytes into image simple image fomat/ file

java,image,scala,image-processing
I am very new to image encoding and would rather not learn a whole lot about it. Basically I'm taking greyscale byte array where each byte equals one pixel. I'm getting this data from mnist where I get 28x28 byte images. Anyway, bellow is my code, so you understand what...

Preload image for seamless background image change in JavaScript

javascript,image,preload
I have a Python websocket application which sends an image path to a JavaScript HTML file. When the image path is received, I change the background image of the webpage to the supplied image. The issue I'm having at the moment, is when the background changes from the old image...

Fetch a saved image and display

ios,image,path
I am developing an App in which I have stored images through imagePicker. now i want to display same images in my collectionView. I got response as a path path=assets/image/155/155_557b1259b8a51.jpg when i add http://xyz.com.assets/image/155/155_557b1259b8a51.jpg then it shows error. How can i get the images through this path.Please Help me out....

How can I query an FS collection in Meteor from the command line?

database,image,mongodb,meteor,collectionfs
It is very useful to run meteor mongo and query collections from the command line, for debugging purposes, etc. Recently, I have added the collectionFS package to enable image storage in the database. However, I am unable to query the database from the command line. db.fs.collection_name.find() is not doing the...

read image using ashx doesn't work in asp.net

c#,asp.net,image,ashx
I am trying to use ashx to load an image from database . when i use this code the image is loaded successfully <% <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Id", "~/Handler/CategoryHandler.ashx?catId={0}") %>' /> But when i use this code <% foreach (ProductCategories VARIABLE in categoriesList) { Response.Write("<div class='wrapper-box'>" + "<a href='product/product.aspx'>"...

Can't get images from storage laravel 5

php,image,laravel
Hey so i'm trying to put my images into a slideshow i have on my index. the images are saved on storage/app , and then the rest of the path i retrive from my database. I managed to output the correct path on the <img src> tag, and the title...

making an image exactly circular without borders

java,android,xml,image
I want a circular image for my Profile activity. I have already tried these answers but it does n't work in my case. Create a circular image view in Android How to make an ImageView with rounded corners How to make an image fit into a circular frame in android...

WP 8.1 - How to save an image to Isolated Storage if know it's URL

c#,image,windows-phone,windows-phone-8.1,isolatedstorage
I have the image URL. How can I save it into Isolated Storage in WP 8.1. Can I trigger both save it and then share it onto Facebook with only one button? This is my code - which work well following Burak Kaan Köse's: public async void GetImage() { StorageFolder...

Set JQuery propeties to Image folder path in img src tag

javascript,jquery,html,image,asp.net-mvc-4
Question background: I'm trying to set two propeties of a JQuery function to an img src who's images are stored in the Images folder of my MVC site. The Issue: The following code shows the properties nextText and prevText being set to a left and right .jpg I have in...

Using key positions in steganography using DCT

image,image-processing,dct
I have a question about steganography. Once the DCT matrix's are computed and the LSB's are replaced can we assume that the location at which the data is entered in the DCT of the cover image is know at the receiver? If not then how is the image reconstructed?

How to prevent exceeding matrix dimensions while dividing an image into blocks?

image,matlab,image-processing,image-segmentation
I have an image which I want to divide into overlapping blocks. I have set the box to be of size 8 rows and 8 columns, and the overlapping factor to be 4 rows/columns. This is what I have written to solve this: img = imread('a03-017-05.png'); overlap = 4 count...

Crop does not work for gallery images

android,image,crop
I am using the following code to crop images from camera and gallery : private void doCrop() { final ArrayList<CropOption> cropOptions = new ArrayList<CropOption>(); Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*"); List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, 0); int size = list.size(); if (size == 0) { Toast.makeText(this, getApplicationContext().getString(R.string.crop_unavailable), Toast.LENGTH_SHORT).show(); // return }...

draw darkened bufferedimage without touching it

java,image,awt
I'm currently making a tile-based strategy game, with its map made of a bunch of sprites (BufferedImages), drawn by java.awt.Graphics.drawimage(..) What i want is to be able to draw those sprites a tone darker if the player is too far away from them. I've seen a lot of similar questions...

merging two images with triangle crop

image,image-manipulation,gimp,inkscape
In Eagle, I've created a circuit that consists of schematic and PCB layout. From Schematic and PCB Layout I've created screenshots in .jpg format. Now, how do I merge these two screenshots with triangle crop just like in example below (left image, sch&pcb merged):. I am using KUbuntu 15.04 with...

Image as a background in JScrollPane

java,image,swing,background,jscrollpane
How to add an image as a background in JScrollPane? I tried this but the image doesn't display: BufferedImage img = null; try { img = ImageIO.read(new File("C:\\Users\\Suraj\\Documents\\NetBeansProjects\\JavaApplication2\\src\\javaapplication2\\images\\2.jpg")); } catch (IOException e) { e.printStackTrace(); } Image imag = img.getScaledInstance(d.width, d.height, Image.SCALE_SMOOTH); ImageIcon imageBack = new ImageIcon(imag); FlowLayout fl = new...

How to convert an Image to Mat Android

android,image,bitmap,mat
I need to process Image for my Application. I get the Images for ImageReader. reader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() { @Override public void onImageAvailable(ImageReader reader) { Image mImage = reader.acquireNextImage(); //mImage to Mat here mImage.close(); } },null); But now, I need to convert those images in Mat. I know that I can pass...

How to convert byte array to image in php?

php,image,image-processing,bytearray
I want to convert the byte array from a webservice to image. The webservice response array looks like the following but I could not figure out how to render this array back to an image. Please help me 'MemberImage' => array (size=151745) 0 => int 255 1 => int 216...

adding link_to with image_tag and image path both

html,ruby-on-rails,image,ruby-on-rails-4,svg
I am trying to replace the tag with link_to in my rails application view. for replacing I have svg icon, text and link all in one tag. Here is below <a class="navbar-brand" href="index.html"><%= image_tag 'logo.svg', "data-svg-fallback" => image_path('logo.svg'), :align=> "left" ,:style => "padding-right: 5px;" %> My Project </a> but I...

I can't download images uploaded ​​with “move_uploaded_file()” code on filezilla

php,html,image,move
When I use move_uploaded_file() code everything works fine and my files are being moved to my server. But later if I want to download those files from my server using filezilla, it says: "Could not start the transfer process" But i can download other files crate with imagejpeg() code. So...

How can I use PHP code in a CSS file

php,css,sql,image,src
I want to find an image source from a MySQL database and assign it to a css style. I just changed the .css extension to .php. It does work with XAMPP and runs everything I want, but when I uploaded my code in cpanel it didn't work correctly. I used...

what is the nodejs package for s3 image upload

node.js,image,amazon-s3
I'm looking to upload my assets to s3. Is there any package in Nodejs like carrierwave in rails I want to resize images with versions. I have come across papercut. What is the best node module for s3 image upload....

Excel VBA 2013 Print Image

image,excel-vba,printing
I would like to print an image that shows in a frame on a userform. frame1.Picture = LoadPicture(spath & xPicture & ".jpg") spath is the full path to where the picture is stored. This shows the picture just fine. Now I would like to be able to print it. Is...

multiple random images in let it snow plug-in

javascript,image,random
i've been playing with jason brown's let it snow plug-in. his code only accommodates for a single custom image, and i've been trying to figure out how to change the code so it accommodates multiple custom images within a random range. !function($){ var defaults = { speed: 0, interaction: true,...

Javascript Image() object erroneously setting height and width to 0 sometimes

javascript,image,object,height,width
I'm working on an app that is dynamically generating images with Javascript's image() object. Code below, where object is the URL I am passing in - resizeImage: function(object) { var img = new Image(); img.src = object; console.log(img); console.log(img.width); console.log(img.height); var ratio; if(img.width > img.height) { ratio = 82/img.width; }...

Import java package from Matlab deploytool to Android Studio App

java,android,image,matlab,jar
I managed to create a java package from a Matlab function (for image processing) using deploytool. I tested it in Eclipse and it runs perfectly. The problem is that I want to use this Matlab function for an Android Studio project and I can´t find any way to make it...

Is there a way to make images take up less space in an apk or will I have to use an APK expansion file? [closed]

android,image,android-studio,apk-expansion-files
I made an app in android studio that has a lot of images, making the app exceed the 50MB limit. I do not fully understand how to make an expansion file so I want to try to avoid it. I copied all the images in each mipmap, can I get...

Background image for iPhones and iPads of various sizes

ios,image
I would like to add a background image for iOS and I want the background image to have appropriate resolutions for all tablet and phone versions. What design considerations should I take into account? What resolution should the image be in?

Image Displaying a Red “X” in a DataGridView when loading from Resources

c#,image,datagridview
Im Trying to add a Image column From My Project's Resources to a newly created DataGridView This Is the Code: DataGridViewImageColumn myImage = new DataGridViewImageColumn(); myImage.Image = Properties.Resources.bullet_arrow_down; myImage.ImageLayout = DataGridViewImageCellLayout.Zoom; myImage.Name = "Remove"; DirectoryGrid.Columns.Add(myImage); But When i run the code i get the default "X" Image and not my...

Best way to resize top banner images (viewport/html)

javascript,html,css,image,resize
I'm trying to find a better way to resize top banner images, creating different images that fit according the viewport orientation and viewport size without the image be "cutted" or distorced. I created the following code (css + js), and I would like to know if is the proper way,...

How to crop image from center using wp_image_editor

wordpress,image,wordpress-plugin,resize-crop,wp-image-editor
I am working on WordPress plugin. In plugin the user upload images from meta field and in back end i use wp_image_editor for cropping and re sizing the images. The images re sized very well but on cropping the images not cropped very well. I give x-dimension 100 and y-dimension...

c++ read in image set with different file names without hardcoding

c++,image,opencv,boost,image-loading
Is there any way of reading in a set of images from file that all have varying names to each other, i.e. no continuity at all? So if you had 4 images in the same folder with the file names of: head.jpg shoulders.png knees.tiff toes.bmp Without hard coding the file...

Trouble generating Barcode using ZXing library with large data

java,android,image,barcode,zxing
I need to generate barcode in 128A format with data: 900000588548001100001305000000000207201512345.6|12345.7 I'm using ZXing library and Here is my method: private void barcodeGenerator(String data) { try { com.google.zxing.MultiFormatWriter writer = new MultiFormatWriter(); BitMatrix bm = writer.encode(data, BarcodeFormat.CODE_128, 700, 200); Bitmap ImageBitmap = Bitmap.createBitmap(700, 200, Config.ARGB_8888); for (int i = 0;...

PHP How to not cache generated HTML but cache static data like images/js/css

javascript,php,css,image,caching
Many PHP developers add the no-cache header on top of their PHP pages, so do I, for obvious reasons. Since PHP generated content is usually dynamic, having the browser cache them results in outdated data being presented to the user. To avoid this caching is usually disabled. <?php //no cache...

Loading images from different folders

javascript,html,css,image,folder
So I want to load different images from different folders. I have a little puzzle where you can change the format for example to 3x3, 3x4, 4x3 and 4x4 etc. and now I want that when someone clicks on "select format" and choose 3x3 it loads images from the 3x3...

How to make text appear in separate div onClick for area of Image Map?

javascript,jquery,html,css,image
So I have an image map and I'm trying to make the sections of the image map clickable so that when the area is clicked, text will appear on the side of the image in a separate div. All I have now is the image map: <div id="aside"> <img src="{{...

why images in the Images.xcassets are not displayed?

ios,image
There are some image resources in my Images.xcassets. Recently they cannot be displayed in the app when testing in the iPhone/iPad devices. I guess they are not copied to the Bundle when build and package. Then i check the Copy Bundle Resources in Build Phases. The Images.xcassets is in here....

Getting an image to render with php

php,image,laravel,image-processing
To keep it simple, I'm trying to display an image using php to help try and prevent any kind of a security loophole. I have the image being read through a php script and I am wanting to render it, so instead of going to http://example.com/path/to/uploads/dir/image.jpg I want to have...

Better image normalization with numpy

python,image,numpy
I already achieved the goal described in the title but I was wondering if there was a more efficient (or generally better) way to do it. First of all let me introduce the problem. I have a set of images of different sizes but with a width/height ratio less than...

JQuery - Calling function after image load

javascript,jquery,image,load,deferred
So I have two functions. One to load the image and the other to resize its container element. Naturally the image element needs to be loaded, before any measurements can be taken. It looks something like this: var imgEl; loadImage(imgSrc); // only call the below, once the above has finished...

How to display images in textview from server

android,image,textview
I receive Data from Server text and in the text there is something like this '[LoadImage:ImageLink]' and I want this text to be replaced with the ImageLink I know how to download the image from the link but I don't know how to display it in the textview I have...

Loading images into html5 canvas

javascript,node.js,image,html5-canvas,sails.js
I am using nodejs sails for my app. The app is going to use 50-100 images at some points. I was wondering if someone can point pro and cons of using /assests/images/ folder vs outside repository i.e. AWS S3 for image storing and pulling to draw on the canvas.

Upload image to server from gallary or camera android

android,image,image-uploading
i have a Activity for Upload image from gallary or camera to server.image upload from camera is fine but upload from gallary is not done.i have a error showing BitmapFactory﹕ Unable to decode stream: FileNotFoundException i want to do when i pick up the image from gallary it is shown...

How to search images by name inside a folder?

php,mysql,image
I have a MySQL table with a column "rounds" and each "rounds" has his own photos. Exemple round1 has photos from start=380 end=385. This means it has 6 photos and the name of the photos contains 380,381,382,383,384 or 385 inside. I use this PHP code to display the photos from...

Asp.net MVC Profile image control

c#,asp.net-mvc,image
In my ASP.NET MVC site, the users need to upload profile pictures, and resize/crop and move the image until the user is satisfied (within the red border as shown here: http://imgur.com/GqeCTil) I've stumbled upon the http://imageresizing.net/ which is very fine, but i kinda need the front UI control for the...

Multiprocessing queue: pygame surface died

python,multithreading,image,pygame,pygame-surface
I want to use multiprocessing to separate two tasks in pygame: Pulling an image from a webcam and showing the image on a screen. The reason I want to do this, is because I want to have fancy image processing I want to separate the web cam polling from the...

C++ Opengl - How to load tgas and pngs in modern OpenGL? [on hold]

image,opengl,c++11,png,tga
I am looking for a way to load tgas and pngs in C++ Opengl - I dislike the idea of using a library though. Is there any sample code / links / advice you could give me in this topic?...

Finding non transparent filled areas in images on javascript canvas

javascript,image,canvas
I've an image with some filled circles, rectangles etc. I want to find x1,x2, y1, y2 areas of filled areas. Javascript Method to detect area of a PNG that is not transparent Accepted answers works fine but i need to find each areas separately. As in the image below, i...

How to add Copyright and Authors info to Images created in PHP?

php,image,file,properties,file-attributes
Is there any way to add Copyright info to the image file created by PHP? To be clearer, you can add copyright info to a file with photoshop, so when you get its properties, you see something similar to: I want to Add/Edit Details info of a file in php....

Make element fill rest of div without resizing Image

html,css,image,width
I want the Logo Image in this nav-bar to fill its height while still retaining its aspect ratio. The remaining width should be filled by the ul element. As long as the ul elements width is not 100% the image is displayed correctly. http://jsfiddle.net/5o0b4xLd/ How can I do that? The...

Change Background image in WPF using C# [duplicate]

c#,wpf,image,background,resources
This question already has an answer here: Change WPF window background image in C# code 3 answers I'd like to change the background image of my WPF application by a button. I know how to do it using WindowsForms, but in WPF I failed. I found a solution already,...

How can I load an image from a local directory in PHP?

php,image,directory,load
My setup (or path) is as follows: |Home |ftpUsername |assets |images.png |script.php |mydomain.com |index.php index.php is located in mydomain.com, which includes script.php in /home/ftpUsername/assets without a problem. script.php is included in index.php using the include() function. My question is, how can I get PHP to load the images (png format)...

Captcha with merging a number with real image

image,image-processing,merge,captcha
I have searched for captcha generation tools, but I could not find any tool which can generate the below captcha pictures. You can seen these when you want to register on google. It uses a number merged on a real picture and produce a new real image picture. Do you...

Dump raw image data

c++,windows,image,raw-data
I have an image stored in memory in the form of raw bytes i.e. I have a char* pointing to the memory location of the image data. Now, I need to somehow validate if the image data is legitimate. What I have currently tried is to simply dump the bytes...

Best Solution for Bootstrap Carousel Image Size Changes Causing Elements on Page to Move

html,css,image,twitter-bootstrap,carousel
I have an image carousel on my site's homepage, and sometimes a few of the images have slightly higher height and width. This causes the page elements, such as a list of test items below the carousel, to move around as each image in the carousel changes. What is the...

Verify data integrity for varbinary column

sql,sql-server,image,sql-server-2012
I am inserting a .jpg into a varbinary(max) column in SQL Server 2012 using the following command: INSERT INTO Employees VALUES(5, (SELECT * FROM OPENROWSET(BULK N'C:\4.jpg',SINGLE_BLOB) AS image)) It inserts a record in the table. Then I used the following command to restore the file from db to file system....

Python Encoding: Open/Read Image File, Decode Image, RE-Encode Image

python,image,encoding,character-encoding
Note: I don't know much about Encoding / Decoding, but after I ran into this problem, those words are now complete jargon to me. Question: I'm a little confused here. I was playing around with encoding/decoding images, to store an image as a TextField in a django model, looking around...

Crop image with settable center and scale in Python PIL

python,image,zoom,python-imaging-library,crop
I would like to crop an image using PIL, although it could be some other module. I need the method to crop with a scale factor, ie 1.5 meaning that the output would be 1.5x zoomed in. Additionally, I would need to set the center where it zooms. This means...

How to make a Javafx Image Crop App

java,image,canvas,graphics,javafx
I am building an application for my colleagues to crop image. I use FXML with Scene Builder to build the GUI. The user click a button to choose a image from his computer. Then, the image is shown in the GUI. User can zoom and move in the pane. At...

My image-links won't work

image,hyperlink,clickable-image
I am trying to link an image, in html looks like this: <a href="#" class="image"><img src="logo.png"></a> and in CSS I have: .baraMeniu a.image{ display:block; } Yeah... display:block is just an awkward try to make the image clickable. I am begginer so please take it step by step. Edit:I forgot to...

Shorter code so fill arrays with same Value

java,android,arrays,image,gridview
For my "memory" game, I'm using a GridView to display 12 cards. At the beginning, the cards are all the same. In all the examples I found, you see something similar to this code to add the picture ids to your ImageAdapter: private Integer[] mThumbIds = { R.drawable.card_back, R.drawable.card_back, R.drawable.card_back,...

image.Decode results in “unknown format” when source is multipart.File

image,go,martini
I have a multipart.File that a user uploads to my server, and then I take that file and upload it to s3 using aws-sdk-go, but I also want to create a thumbnail of that image. The code below works fine in my tests when I file is the return value...

MATLAB ConnectedComponentLabeler does not work in for loop

image,matlab,image-processing,computer-vision,matlab-cvst
I am trying to get a set of binary images' eccentricity and solidity values using the regionprops function. I obtain the label matrix using the vision.ConnectedComponentLabeler function. This is the code I have so far: files = getFiles('images'); ecc = zeros(length(files)); %eccentricity values sol = zeros(length(files)); %solidity values ccl =...

Image exceeding div's max-height and max-width rules

html,css,image
I created a picture grid and for some reason the pictures aren't responding to the max width and max height rules. I made up the class .sizedimg { max-width:100%; max-height:100%; } To size the images so that they would be in their natural state, but I want them to fix...

image with webKit transform appeat under the next div

jquery,css,image,accordion
I trying to resolve this issue shown in the image for clarification. I have a small thumbnail with webkit transform. when I hover, The size get bigger. Wehn I use accordion, part of the enlarged image appears under the accordion div. I tried z-index, but it did not work. I...

Resize images to specific width only (AppleScript or Automator)

image,osx,applescript,image-resizing,automator
I've been searching google.com a couple of hours trying to find a way to do this, but there is no answer. Everywhere is resize to the longest size, but nothing about resize to the specified width only. Is there any way in Automator or AppleScript to resize images to a...

HTML: Base64 image displaying/copying with wrong height

javascript,html,css,image,svg
So, basically I have a simple base64 image like this: http://jsfiddle.net/rm5c8o1t My problem is that it only displays the upper half of it. If I simply add this to the img tag: style="height: 300px;" it will display as I want it too. The issue now is when I try to...

Changing image source in JavaScript

javascript,image,dom,onclick,imagesource
I'm new to JavaScript, and I'm trying to alternate an image every click from 1st to 2nd and from 2nd to 1st(indefinitely). I tried this: function change() { var imgId = document.getElementById("image"); var ubuntu = imgId.src="ubuntu.jpg"; var debian = imgId.src="debian.jpg" if(imgId.src="ubuntu.jpg") { return debian; } else if(debian) { return ubuntu;...

Python Resize Multiple images ask user to continue

python,xml,image,resize
I'm trying to make a script that resize multiple or a single image based on a data pulled from XML. My question is if i have multiple images how can I print out a qusetion like "There are more than 1 image do you wish to resize image 2 also?......

Display .bin depth image in Matlab

image,matlab,image-processing,bin
Here is the .bin image which I saved in c#. Please anyone help to view this in MATLAB. the dimension of image 424 x 512. I have tried this code, but its not working correctly file = fopen('test0.bin', 'r'); A = fread(file, 424*512, 'uint16=>uint16'); A1 = reshape(A, 424, 512); imagesc(A1)...

How can I create a PNG image file from a list of pixel values in Python?

python,image,list,file,python-imaging-library
I can generate a list of pixel values from an existing image file using a procedure like the following: from PIL import Image image = Image.open("test.png") pixels = list(image.getdata()) width, height = image.size pixels = [pixels[i * width:(i + 1) * width] for i in xrange(height)] How could I convert...

Windows Phone 8.1 get image from base64 string

c#,image,windows-phone-8.1
How can i get an Image from a base64 string on Windows Phone 8.1? I know how to decode the image if that helps? var imageBytes = Convert.FromBase64String(base64StringWithImageData); var ms = new MemoryStream(imageBytes, 0, imageBytes.Length); var decoder = await BitmapDecoder.CreateAsync(BitmapDecoder.PngDecoderId, ms.AsRandomAccessStream()); But nowhere have i found how i can get...

Create a border around image when active/clicked

css,image,border,active
I want to let my website visitors select from 3 different images and what I want now is a border around the image when they selected, so basically when it's active. I hope it's understandable what I am looking for. Can someone help me perhaps with that? I've tried to...

How to make an image fade out by itself in a few seconds?

ios,objective-c,image,uiimage,fadeout
i got a button to show an image in the UIImageView. what i need to do is to get this image to fade out by itself in 2 seconds, is it possible to do so? here is my code on the button: - (IBAction)A { UIImage *Img = [UIImage imageNamed:@"AString.png"];...

Git push hangs on POST git-receive-pack

image,git,tfs,git-push
I'm on a Windows 8 Machine with git version 1.9.5.msysgit.0 pushing to a TFS Git Repository hosted on HTTPS. When I push any text file everything is fine. But pushing a certain .jpg file git hangs on POST git-recieve-pack with the following output: $ git push -v Pushing to https://tfs.ourcompanyn.com/tfs/DefaultCollection/Prototypes/_git/TestProject...

How to resize image according from screen resolution on html css

html,css,image,screen-resolution
I want to change an image so that its size is according to the screen resolution, for example 1920x1080 to 1600x900, using HTML and CSS. How can I do it?...

Convert Android image into a file that MATLAB can read

android,image,matlab,image-processing,bitmap
I´m working on a project related with image recognition using MATLAB and I'm currently using an Android app to help with some pre-processing steps. I thought it was going to be easy to work with matrices instead of bitmaps. I finally managed to finish my algorithm and to import it...

How to show image like video in facebook

facebook,image,video
I want to ask about how to show image like video in facebook Look if you post this link in facebook post area will show you video but no video in this link.