java,android,image,barcode,zxing
You can upload the barcode image you produced to the ZXing Decoder Online to confirm if it is valid: http://zxing.org/w/decode.jspx There is no intrinsic limit to the length of a Code 128 barcode, and all the characters you have are valid. Having said that, with Code 128A barcodes, having more...
java,image,canvas,graphics,javafx
Your question is too much to be answered on StackOverflow. I suggest you start with reading the official Oracle documentation about JavaFX. However, since it's an interesting topic, here's the answer in code. There are several things you need to consider: use an ImageView as container use a ScrollPane in...
Generally speaking, the extraction method assumes the knowledge of the embedding rules so it can reverse them. Deterministic processes are hardcoded, while for stochastic processes you need to provide additional information to replicate their state. For example: If you modify a specific DCT coefficient in an 8x8 block, the extraction...
The problem occurs with msysgit and curl in the current version. There's a problem with handling authentication over HTTPS: Documented here: https://github.com/msysgit/git/issues/349 Solution: Install the pre-release of Git for Windows 2.x...
javascript,html,css,image,folder
If you want to have url for image in format like: "/images/3x3/1.png" than you have to change this line of code: puzzle += '<img src="images/' + puzzlepieces[puzzleNr] + '.png" class="puzzlepiece" id="position' + puzzlepieces[puzzleNr] + '" alt="' + puzzlepieces[puzzleNr] + '" onclick="shiftPuzzlepieces(this);" width="100" height="100" />'; to puzzle += '<img src="images/' +...
Here is the Code piece for Taking a Picture through Default Camera (here I implemented Intent to to fetch the image). After that store it to SD card(here a new file will be created and the newly taken image will be stored ); and if you don't want to store...
c++,image,opencv,boost,image-loading
For anyone else wondering: #include <boost/filesystem.hpp> namespace fs = boost::filesystem; std::vector<cv::Mat> imageVec; fs::path p ("."); fs::directory_iterator end_itr; // cycle through the directory for (fs::directory_iterator itr(p); itr != end_itr; ++itr){ // If it's not a directory, list it. If you want to list directories too, just remove this check. if (fs::is_regular_file(itr->path()))...
This line that you have in your button3_Click handler is incorrect: bt_imp.Click += (s, ea) => { MyHandler(sender, e, val); }; What it is doing right now is capturing the sender/event arguments from the calling method. What you want to do is to let the MyHandler get the sender/arguments from...
You're not declaring $image_width or $image-height and you are referencing $image instead of $source_image in imagecopyresampled(). I too was getting a plain white image, but after this I get the expected result: $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...
if you know the image path or name then you may implement something like this. - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ UICollectionViewCell *cell = [[UICollectionViewCell alloc]initWithFrame:CGRectMake(0, 0, 50.0, 50.0)]; cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath]; UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 50.0, 50.0)]; [imageView setImage:[UIImage...
Don't assign dimensions of your SVG via style. Assign them via actual attributes: <svg id="svg" width="320" height="320" > Then the resulting image will be created of correct size and copy/paste will work as well. Demo: http://jsfiddle.net/p2Lv5sa0/2/...
The plugin author loads a single custom image into a hidden element with if (settings.image != false) { $("<img src='"+settings.image+"' style='display: none' id='lis_flake'>").prependTo("body") } and loads the snowflakes with this ctx.drawImage($("img#lis_flake").get(0) This solution hasn't been tested, but if you are willing to hack the plugin a bit, you could potentially...
Your current issue is in the #logo attributes - max-width and max-height won't actually expand the div unless there is content inside that forces it to expand. Also, you'll want to set the background-size = cover so the aspect ratio is maintained. Try this instead: #logo { max-height: 100%; height:...
php,image,laravel,image-processing
The code is working - the problem is it's sending extra information. The file is there, it is found, it is being sent. The link to your image returns: HTTP/1.1 200 OK Date: Wed, 17 Jun 2015 22:52:03 GMT Server: Apache Connection: close Content-Type: image/jpeg But the subsequent output is...
One option is to call Windows Print dialog via shell command. Example: (Full code) Option Explicit Private Declare Function apiShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _ ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String,...
Yes, finally i solved this problem. If any of you are facing the same problem then use canvas.drawCircle(100, 100, 90, paint); instead of canvas.drawCircle(100, 100, 100, paint); this will definitely solve your problem.
image,matlab,image-processing,computer-vision
You can use the bitdepth parameter to set that. imwrite(img,'myimg.png','bitdepth',16) Of course, not all image formats support all bitdepths, so make sure you are choosing the the right format for your data....
@Brendan Hannemann show me a link that where is expaint. The code i must use is: <img src="<%=ResolveUrl("~/afbeeldingen/berichten.png") %>" alt="nieuwe berichten" id="berichten" /> ...
javascript,jquery,html,image,asp.net-mvc-4
Just create a baseUrl in script tag in your layout page. <script type="text/javascript"> var baseUrl = "@Url.Content("~")"; </script> and use that in your script like below: $(document).ready(function () { $('.bxslider').bxSlider({ nextSelector: '#slider-next', prevSelector: '#slider-prev', controls: true, pager: false, nextText: '<img src="'+baseUrl +'Images/rightArrow.jpg" height="25" width="25"/>', prevText: '<img src="'+baseUrl +'Images/leftArrow.jpg" height="25" width="25"/>'...
javascript,image,socket.io,raphael
You could create a folder under the same folder as the script files and name it as "public" (or whatever you'd like). On your socket-server.js, var express = require('express'); var app = express(); app.use(express.static('public')); //let express access your "public" folder. On your client.html, var mapImg = paper.image("./map.png",x,y,width,height); Paper will try...
Personally, I do not think this is the right problem to address. The whole point in separating markup and styles is to simplify things. I see very little value in separating it so rigidly you have to mix css, php and sql instead (you just moved the same problem elsewhere)....
This looks like a job for glob, which returns an array of file names matching a specified pattern. I'm aware of the other answer just posted, but let's provide an alternative to regex. According to the top comment on the docs page, what you could do is something like this:...
java,image,swing,background,jscrollpane
If your goal is to simply show an image in a JScrollPane without showing other components (such as a JTable) in the JScrollPane, then you should: Make an ImageIcon out of your image via new ImageIcon(myImage) Add that Icon to a JLabel Place the JLabel into the JScrollPane's viewport, something...
This the list of current screen resolutions for the variety of devices: click for resolutions You could create 10 different images, 5 each for the landscape and portrait views. Alternatively, you could create 2 or 4 images to cater for the landscape and portrait views and use code to check...
python,image,zoom,python-imaging-library,crop
It is just a matter of getting the center and the sizes right. Determine the center of the spot where you want to crop Determine the new size using the scale factor Determine the bounding box of the cropped image The following script should do the trick. import os.path from...
javascript,jquery,html,css,image
I did a fiddle. I hope that it help you. Mouse over the image and click on the points of coordinates $(function(){ $("#Map area").click(function(){ $("#show_message").html($(this).attr('title')); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="show_message" style="padding:10px; margin:10px; background:#FF0000;color:#FFF"> xxxxxx </div> <div id="aside"> <img src="http://www.sfbayshop.com/images/maps/HaightStreetMap.gif" alt="" usemap="#map" />...
javascript,php,css,image,caching
you can use a htaccess to define files that you want to be cached all you want is to make a .htaccess file in the main directory of your website and add this code example: # cache images/pdf docs for 1 week <FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif)$"> Header set Cache-Control "max-age=604800, public, must-revalidate"...
javascript,html5,image,security
If a picture is displayed on someone's screen, there is no way you can avoid them to save it on their computer (even if you disable everything). Trying to obfuscate the images will only result in a loss of time, performance, and could make your website much less user-friendly....
This option is suitable? input{ display: none; } label{ display: inline-block; width: 100px; height: 100px; position: relative; border: 4px solid transparent; } input:checked + label{ border: 4px solid #f00; } <input type="radio" id="r1" name="radio" /> <label for="r1"> <img src="http://www.auto.az/forum/uploads/profile/photo-thumb-1.jpg?_r=1431896518" alt="" /> </label> <input type="radio" id="r2" name="radio" /> <label for="r2"> <img...
php,image,file,properties,file-attributes
I don't believe that PHP natively contains a function to edit the EXIF data in a JPEG file, however there is a PEAR extension that can read and write EXIF data. pear channel-discover pearhub.org pear install pearhub/PEL Website for the module is at http://lsolesen.github.io/pel/ and an example for setting the...
you can get the size of a file via the fs core module, using the stat command - https://nodejs.org/api/fs.html#fs_fs_stat_path_callback. This is valid for all files, not only images.
image,unix,imagemagick,imagemagick-convert
I don't have 2 animated GIFs of the same length, so I'll just use two copies of this one: Let's look at the frames in there, with this: identify 1.gif 1.gif[0] GIF 500x339 500x339+0+0 8-bit sRGB 32c 508KB 0.000u 0:00.000 1.gif[1] GIF 449x339 500x339+51+0 8-bit sRGB 32c 508KB 0.000u 0:00.000...
What you have will work for rows that are added via DataGridView.DataSource. However, as you've seen, the NewRow still displays a red x. This could be solved as shown here. However, once you've edited a cell of the NewRow and another one is added, the editing row no longer has...
You're not actually passing a callback function: NewImage.onload = ImageLoadComplete(); You're passing in the result of calling ImageLoadComplete(), which means you call your callback immediately. Don't call the function and your code should work as expected (most of the time): NewImage.onload = ImageLoadComplete; One issue that you'll encounter is that...
Suppose you rename one of the files which does not works for download to test.jpg to test.gif (assuming that jpg are not working). If it does not work.. Check the permission for read and writes in your control panel for ftp user...
image,matlab,image-processing,mask,boundary
It's very simple. I actually wouldn't use the code above and use the image processing toolbox instead. There's a built-in function to remove any white pixels that touch the border of the image. Use the imclearborder function. The function will return a new binary image where any pixels that were...
If it's responsive, use percentage heights and widths: html { height: 100%; width: 100%; } body { height: 100%; width: 100%; margin: 0; padding: 0; } div.container { width: 100%; height: 100%; white-space: nowrap; } div.container img { max-height: 100%; } <div class="container"> <img src="http://i.imgur.com/g0XwGQp.jpg" /> <img src="http://i.imgur.com/sFNj4bs.jpg" /> </div>...
javascript,html,css,image,resize
Using the solution of Saumil Soni, Germano Plebani and http://stephen.io/mediaqueries/, I reach the following solution (thank you guys!): /* TOP BANNER */ /* For mobile phones: */ @media only screen and (max-width: 414px) and (orientation : portrait) { .tp-banner { background-image: url(../images/style/slider/slide414x736.jpg); background-size: cover; } } @media only screen and...
html,ruby-on-rails,image,ruby-on-rails-4,svg
Remove the space after image_tag. <%= link_to '#' do %> My Project <%= image_tag('logo.svg', "data-svg-fallback" => image_path('logo.svg'), :align=> "left" ,:style => "padding-right: 5px;") %> <% end %> ...
Change your final loop to: for idx, image in enumerate(imgPath): #img resizing goes here count_remaining = len(imgPath) - (idx+1) if count_remaining > 0: print("There are {} images left to resize.".format(count_remaining)) response = input("Resize image #{}? (Y/N)".format(idx+2)) #use `raw_input` in place of `input` for Python 2.7 and below if response.lower() !=...
sql,sql-server,image,sql-server-2012
This worked for me: How to export image field to file? The short version without the cursor looks like this: DECLARE @ImageData VARBINARY(max) DECLARE @FullPathToOutputFile NVARCHAR(2048); SELECT @ImageData = pic FROM Employees WHERE id=5 SET @FullPathToOutputFile = 'C:\51.jpg' DECLARE @ObjectToken INT EXEC sp_OACreate 'ADODB.Stream', @ObjectToken OUTPUT; EXEC sp_OASetProperty @ObjectToken, 'Type',...
try this, hope this will help you Drawable d = getResources().getDrawable(R.drawable.toplogos) BitmapDrawable bitDw = ((BitmapDrawable) d); Bitmap bmp = bitDw.getBitmap(); ByteArrayOutputStream stream = new ByteArrayOutputStream(); bmp.compress(Bitmap.CompressFormat.PNG, 100, stream); Image image = Image.getInstance(stream.toByteArray()); document.add(image); ...
I recommend using s3-uploader, it's flexible and efficient resize, rename, and upload images to Amazon S3.
Your application can't find the ""images/cirkel.png". You have few alternatives: Use an absolute path (like I do in the modified code below). Use resources (there are hundreds of good tutorials how to do this). I use absolute path for quick hacks. For anything serious I would chose resources as they...
What you are trying to do is not possible in the storage directory but possible only in public directory, also exposing the path or URL to your laravel storage directory creates some vulnerability and its bad practice However there is a way to workaround it: First, you need an Image...
Your code is so full of errors that I started from the beginning to create a GUI divided into 3 areas. You must start a Swing application with a call to the SwingUtilities invokeLater method. This ensures that the Swing application starts on the Event Dispatch thread (EDT). A Java...
ios,image,uiimage,uiimageorientation
- (UIImage *)removeRotationForImage:(UIImage*)image { if (image.imageOrientation == UIImageOrientationUp) return image; UIGraphicsBeginImageContextWithOptions(image.size, NO, image.scale); [image drawInRect:(CGRect){0, 0, image.size}]; UIImage *normalizedImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return normalizedImage; } ...
python,image,opencv,image-processing,filtering
This might be what you're looking for: http://matplotlib.org/users/image_tutorial.html Specificially look at the "Examining a specific data range" This will allow you to easily clip the image....
android,image,android-intent,crop,android-fileprovider
From Storage Options | Android Developers: By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user). ACTION_CROP launches an "other application" that supports cropping, and passes it the URI of the file to crop. If that file...
java,image,scala,image-processing
Before you write it out with ImageIO, create a BufferedImage first. It can be as simple as using the setRGB methods, and has the added benefit of allowing you to observe the image before writing it out.
python,image,list,file,python-imaging-library
Quick fix First, you need to have your pixel tuples in a single un-nested list: pixels_out = [] for row in pixels: for tup in row: pixels_out.append(tup) Next, make a new image object, using properties of the input image, and put the data into it: image_out = Image.new(image.mode,image.size) image_out.putdata(pixels_out) Finally,...
c#,wpf,image,background,resources
Firstly, add a Folder to your Solution (Right click -> Add -> Folder), name it something like "Resources" or something useful. Then, simply add your desired image to the folder (Right click on folder -> Add -> Existing item). Once it's been added, if you click on the image and...
this is a snippet code from one of my old projects so please check it again ! while (matcher.find()) { try { // Maybe it's Text Before Image String textBeforImage = text.substring(offset, matcher.start()); offset += textBeforImage.length(); textBeforImage = textBeforImage.trim(); if (textBeforImage.length() != 0) { addTextView(textBeforImage); } // now , if...
image,matlab,image-processing,computer-vision,matlab-cvst
The error is a bit hard to understand, but I can explain what exactly it means. When you use the CVST Connected Components Labeller, it assumes that all of your images that you're going to use with the function are all the same size. That error happens because it looks...
The problem is that you have not understood the principle of asset catalogs. They give to their assets the names of the image sets. You no longer use the old size-based image names. That is the whole point of asset catalogs! You use one name and the right asset is...
image,matlab,user-interface,graph,plot
So figured it i had to write the handles of the GUI to the workspace in the opening function of the gui % --- Executes just before VR_gui is made visible. function VR_gui_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure...
html,css,image,screen-resolution
HTML : <div class="img-div"> <img src="path-to-image"> </div> CSS : .img-div { height:100%; width:100%;} img { max-width:100% } ...
image,qt,qlistwidget,qlistwidgetitem
Use QImage first to scale the image and construct the icon from the resulting pixmap. QSize desiredSize; Qimage orig(filesToLoad[var]); Qimage scaled = orig.scaled( desiredSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); QListWidgetItem *listItem = new QListWidgetItem(QIcon(Qpixmap::fromImage(scaled)),filename); It is very common to store the presized image too on the disk, to avoid the two step conversion...
wordpress,image,wordpress-plugin,resize-crop,wp-image-editor
Try this code: $crop = array( 'center', 'center' ); resize( $max_w, $max_h, $crop); ...
image,image-manipulation,gimp,inkscape
If the images are in the same ratio, you can use GIMP: open both images in gimp select smallest image and copy it to the clipboard paste clipboard content as a layer into the largest image transform/scale layer (shift + t), find a best mapping with the background image (you...
javascript,node.js,image,html5-canvas,sails.js
Yes, use a CDN if you have the option. Pros: - Save enormously on website load time / speed. - Better for organization / maintenance. Cons: - One more paid account; but you may end up having to upgrade your hosting anyway if your images continue to add up with...
This is all about how you display the images. Let's say an image has been uploaded and you stored the record about it in some shared storage (like DB), you saved the image id and the node specific url where the image was temporary placed. I hope you can access...
Java components that are generated from MATLAB code using deploytool (or using other functionality from MATLAB deployment products such as MATLAB Compiler, MATLAB Builder etc.) depend on the MATLAB Compiler Runtime (MCR). The MCR has much too large a footprint to run on an Android device, and it's really not...
I think that i found a possible answer. I give to my ImageReader a simple plane format like JPEG. reader = ImageReader.newInstance(previewSize.getWidth(),previewSize.getHeight(), ImageFormat.JPEG, 2); Then i do that : ByteBuffer bb = image.getPlanes()[0].getBuffer(); byte[] buf = new byte[bb.remaining()]; imageGrab = new Mat(); imageGrab.put(0,0,buf); ...
html,css,image,twitter-bootstrap,carousel
Todd, Hi there. Have a look at this post here to do with Bootstrap carousel. There is a Fiddle with full code for you to use. I have 4 very different sized images in a responsive carousel. The carousel does not change size when each image slides in. You could...
javascript,image,dom,onclick,imagesource
You can just toggle the src between your 2 images like so: function change () { var imgElement = document.getElementById("image"); if (imgElement.src === 'debian.jpg') { imgElement.src = 'ubuntu.jpg'; } else { imgElement.src = 'debian.jpg'; } } Or, using a ternary operator: function change () { var imgElement = document.getElementById("image"); var...
Try this Working code Buttonclick to take camera dialog.show(); Add this inside Oncreate() captureImageInitialization(); try this it will work // for camera private void captureImageInitialization() { try { /** * a selector dialog to display two image source options, from * camera ‘Take from camera’ and from existing files ‘Select...
image,matlab,image-processing,computer-vision,vision
Assuming your large image is stored in A, then ind = arrayfun(@(ii) [ceil(ii/8) ,mod(ii-1, 8)+1], 1:40, 'uniformoutput',0); Acell = cellfun(@(rc) A((1:64)+64*(rc(1)-1), (1:64)+64*(rc(2)-1)), ind, 'UniformOutput', 0); should return a cell array Acell containing the individual images. The idea is to generate a vector of indices first, determining the order in which...
The z-index property only affects elements that have a position value other than static (the default). Try adding position: relative to the thumbnail element. .smallImages { position: relative; z-index: 1; } ...
php,image,image-processing,bytearray
Use pack to convert data into binary string, es: $data = implode('', array_map(function($e) { return pack("C*", $e); }, $MemberImage)); // header here // ... // body echo $data; ...
You can write it straight out as RGB in binary like you already have - say to a file called image.rgb. Then use ImageMagick, which is installed on most Linux distros, and available for OSX and Windows to convert it to PNG, JPEG or something more common: convert -size 300x400...
android,image,matlab,image-processing,bitmap
If I'm interpreting your question correctly, you have an image stored in the Bitmap class and you want to save this to file locally on your Android device. You then want to load this image into MATLAB for your image recognition algorithm. Given the fact that your image is in...
From script.php, you need to read, then output the PNG image (passing the right mimetype, so it will be recognized as an image). You may use readfile or even file_get_contents to read filestream, like this: (I'm assuming you'll pass the image name by $_GET 'image'. /script.php?image=imagename.png and using a no_image.png...
To fix the product image you need to: This will Stop the image flowing onto the text below: .productpiccontainer { width: 100%; height: 100%; border: 1px solid #D9D9D9; min-height: 350px; max-height: 350px; overflow: hidden; } This will fix the position problem so you see more of the product: .sizedimg {...
Instead of ndimage.zoom you could use scipy.misc.imresize. This function allows you to specify the target size as a tuple, instead of by zoom factor. Thus you won't have to call np.resize later to get the size exactly as desired. Note that scipy.misc.imresize calls PIL.Image.resize under the hood, so PIL...
You can use Graphics2D.drawImage(BufferedImage image, BufferedImageOp op, int x, int y) and a RescaleOp to alter the colours when drawing the image: g2.drawImage(image, new RescaleOp( new float[]{0.5f, 0.5f, 0.5f, 1f}, // scale factors for red, green, blue, alpha new float[]{0, 0, 0, 0}, // offsets for red, green, blue, alpha...
Writing a loader for TGA is relatively straightforward, so for an exercise: go for it. PNG on the other hand is a different kind of beast. It has a gazillion features, supports multiple compression schemes and encodings, all of which you have to support to load PNG files generated by...
ios,image,uitableview,asynchronous,sdwebimage
I ended up using two UIImageViews, one for each photo, overlapped. When the real (big) image is completely downloaded I smoothly fade the blurred one.
I found a solution that works! var imageBytes = Convert.FromBase64String(base64String); using (InMemoryRandomAccessStream ms = new InMemoryRandomAccessStream()) { using (DataWriter writer = new DataWriter(ms.GetOutputStreamAt(0))) { writer.WriteBytes((byte[])imageBytes); writer.StoreAsync().GetResults(); } var image = new BitmapImage(); image.SetSource(ms); } Found the solution here: Load, show, convert image from byte array (database) in Windows Phone 8.1...
If I understood your question, I added 2 links dealing with image re-sizing: http://www.codeproject.com/Tips/481015/Rename-Resize-Upload-Image-ASP-NET-MVC http://www.leniel.net/2012/04/resize-img-on-fly-aspnet-webimage.html I hope it helps, please let me know... Update: This link may help too (from comments) - http://techslides.com/image-zoom-drag-and-crop-with-html5...
image,image-processing,merge,captcha
Google sources these Captcha images from Street View imagery. Direct quote from Google spokesperson: We’re currently running an experiment in which characters from Street View images are appearing in CAPTCHAs. We often extract data such as street names and traffic signs from Street View imagery to improve Google Maps with...
c#,image,windows-phone,windows-phone-8.1,isolatedstorage
Don't forget to change 'imagefile' path and fileContent variable. private async void SaveFile() { try { StorageFolder folder = ApplicationData.Current.LocalFolder; if(folder != null) { StorageFile file = await folder.CreateFileAsync("imagefile", CreationCollisionOption.ReplaceExisting); byte[] fileContnet = null; // This is where you set your content as byteArray Stream fileStream = await file.OpenStreamForWriteAsync(); fileStream.Write(fileContent,...
javascript,jquery,image,load,deferred
That's because you are explicitly calling resizeModal before the promise is resolved: loadImage(imgSrc).done( resizeModal() ) Just like with foo(bar()), this will call resizeModal and pass its return value to done(). You want to pass the function itself instead: loadImage(imgSrc).done(resizeModal) This basically means "call resizeModal once you are done"....
It's perfectly possible :) function show_image(src, width, height, alt) { var img = document.createElement("img"); img.src = src; img.width = width; img.height = height; img.alt = alt; // This next line will just add it to the <body> tag // but you can adapt to make it append to the element...
You should get path from URI. Use below function: private String getRealPathFromURI(Uri contentURI) { //Log.e("in","conversion"+contentURI.getPath()); String path; Cursor cursor = getContentResolver() .query(contentURI, null, null, null, null); if (cursor == null) path=contentURI.getPath(); else { cursor.moveToFirst(); int idx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA); path=cursor.getString(idx); } if(cursor!=null) cursor.close(); return path; } ...
The problem is that Response.Write does not expand the ~character to the base URL, so the URL of the image that is generated in the HTML of the page is similar to this: <img src='~/Handler/ProductHandler.ashx?Id=123' /> In order to solve this, you have to expand the URL before you use...
image,osx,applescript,image-resizing,automator
You can do this with plain AppleScript and a shell utility entitled sips: on open droppings repeat with everyDrop in droppings set originalFile to quoted form of POSIX path of (everyDrop as text) tell application "Finder" set originalName to everyDrop's name set imageContainer to (everyDrop's container as text) end tell...
javascript,image,object,height,width
Sounds like your image hasn't loaded yet when you get its width or height. Then it will be 0. When you refresh, the image is in your browser cache and will load immediately so its width and height are available straight up. Use the onload() event of the Image object...
ios,objective-c,image,uiimage,fadeout
Try this: - (IBAction)A { UIImage *Img = [UIImage imageNamed:@"AString.png"]; [ImageView setImage:Img]; Img.hidden = NO; Img.alpha = 1.0f; [UIView animateWithDuration:2 delay:0 options:0 animations:^{ Img.alpha = 0.0f; } completion:^(BOOL finished) { Img.hidden = YES; }]; } ...
python,image,encoding,character-encoding
The UnicodeEncodeError is popping up because a jpeg is a binary file and ASCII encoding is for plain text in plain text files. Plain text files can be created with generic text editors like notepad for Windows or nano for Linux. Most will either use ASCII or Unicode encoding. When...
android,image,android-studio,apk-expansion-files
First of all, mipmap folders are for your app icon only. Any other other resources must be placed in drawable folder. Take a look at this post mipmap vs drawable. And to answer your question, there are several ways to optimize your images and layout to decrease the size of...
image,matlab,image-processing,image-segmentation
If you simply want to ignore the columns/rows that lie outside full sub-blocks, you just subtract the width/height of the sub-block from the corresponding loop ranges: overlap = 4 blockWidth = 8; blockHeight = 8; count = 1; for i = 1:overlap:size(img,1) - blockHeight + 1 for j = 1:overlap:size(img,2)...
The call uploader.Upload reads to the end of the file. Seek back to the beginning of the file before calling CreateThumbnail: func UploadToS3(file multipart.File, /*snip*/) { _, uploadErr := uploader.Upload(&s3manager.UploadInput{ Bucket: aws.String(bucket), Key: aws.String(key), Body: file, ContentType: aws.String(mimeType), ACL: aws.String("public-read"), }) // Seek back to beginning of file for CreateThumbnail...