Search Results

Search found 19766 results on 791 pages for 'image gallery'.

Page 4/791 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • System.Drawing.Image as source for asp.net image container

    - by trnTash
    I created image from byte array System.Drawing.Image newImage; using (MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length)) { ms.Write(imageBytes, 0, imageBytes.Length); newImage = System.Drawing.Image.FromStream(ms, true); } and now I need to have this image as a source for asp:Image (System.Web.UI.WebControls.Image). Is this possible as I know that conversion is impossible?

    Read the article

  • Saving image from Gallery to db - Coursor IllegalStateException

    - by MyWay
    I want to save to db some strings with image. Image can be taken from gallery or user can set the sample one. In the other activity I have a listview which should present the rows with image and name. I'm facing so long this problem. It occurs when I wanna display listview with the image from gallery, If the sample image is saved in the row everything works ok. My problem is similar to this one: how to save image taken from camera and show it to listview - crashes with "IllegalStateException" but I can't find there the solution for me My table in db looks like this: public static final String KEY_ID = "_id"; public static final String ID_DETAILS = "INTEGER PRIMARY KEY AUTOINCREMENT"; public static final int ID_COLUMN = 0; public static final String KEY_NAME = "name"; public static final String NAME_DETAILS = "TEXT NOT NULL"; public static final int NAME_COLUMN = 1; public static final String KEY_DESCRIPTION = "description"; public static final String DESCRIPTION_DETAILS = "TEXT"; public static final int DESCRIPTION_COLUMN = 2; public static final String KEY_IMAGE ="image" ; public static final String IMAGE_DETAILS = "BLOP"; public static final int IMAGE_COLUMN = 3; //method which create our table private static final String CREATE_PRODUCTLIST_IN_DB = "CREATE TABLE " + DB_TABLE + "( " + KEY_ID + " " + ID_DETAILS + ", " + KEY_NAME + " " + NAME_DETAILS + ", " + KEY_DESCRIPTION + " " + DESCRIPTION_DETAILS + ", " + KEY_IMAGE +" " + IMAGE_DETAILS + ");"; inserting statement: public long insertToProductList(String name, String description, byte[] image) { ContentValues value = new ContentValues(); // get the id of column and value value.put(KEY_NAME, name); value.put(KEY_DESCRIPTION, description); value.put(KEY_IMAGE, image); // put into db return db.insert(DB_TABLE, null, value); } Button which add the picture and onActivityResult method which saves the image and put it into the imageview public void AddPicture(View v) { // creating specified intent which have to get data Intent intent = new Intent(Intent.ACTION_PICK); // From where we want choose our pictures intent.setType("image/*"); startActivityForResult(intent, PICK_IMAGE); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub super.onActivityResult(requestCode, resultCode, data); // if identification code match to the intent, //if yes we know that is our picture, if(requestCode ==PICK_IMAGE ) { // check if the data comes with intent if(data!= null) { Uri chosenImage = data.getData(); String[] filePathColumn = {MediaStore.Images.Media.DATA}; Cursor cursor = getContentResolver().query(chosenImage, filePathColumn, null, null, null); cursor.moveToFirst(); int columnIndex = cursor.getColumnIndex(filePathColumn[0]); String filePat = cursor.getString(columnIndex); cursor.close(); ImageOfProduct = BitmapFactory.decodeFile(filePat); if(ImageOfProduct!=null) { picture.setImageBitmap(ImageOfProduct); } messageDisplayer("got picture, isn't null " + IdOfPicture); } } } Then the code which converts bitmap to byte[] public byte[] bitmapToByteConvert(Bitmap bit ) { // stream of data getted for compressed bitmap ByteArrayOutputStream gettedData = new ByteArrayOutputStream(); // compressing method bit.compress(CompressFormat.PNG, 0, gettedData); // our byte array return gettedData.toByteArray(); } The method which put data to the row: byte[] image=null; // if the name isn't put to the editView if(name.getText().toString().trim().length()== 0) { messageDisplayer("At least you need to type name of product if you want add it to the DB "); } else{ String desc = description.getText().toString(); if(description.getText().toString().trim().length()==0) { messageDisplayer("the description is set as none"); desc = "none"; } DB.open(); if(ImageOfProduct!= null){ image = bitmapToByteConvert(ImageOfProduct); messageDisplayer("image isn't null"); } else { BitmapDrawable drawable = (BitmapDrawable) picture.getDrawable(); image = bitmapToByteConvert(drawable.getBitmap()); } if(image.length>0 && image!=null) { messageDisplayer(Integer.toString(image.length)); } DB.insertToProductList(name.getText().toString(), desc, image ); DB.close(); messageDisplayer("well done you add the product"); finish(); You can see that I'm checking here the length of array to be sure that I don't send empty one. And here is the place where Error appears imo, this code is from activity which presents the listview with data taken from db private void LoadOurLayoutListWithInfo() { // firstly wee need to open connection with db db= new sqliteDB(getApplicationContext()); db.open(); // creating our custom adaprer, the specification of it will be typed // in our own class (MyArrayAdapter) which will be created below ArrayAdapter<ProductFromTable> customAdapter = new MyArrayAdapter(); //get the info from whole table tablecursor = db.getAllColumns(); if(tablecursor != null) { startManagingCursor(tablecursor); tablecursor.moveToFirst(); } // now we moving all info from tablecursor to ourlist if(tablecursor != null && tablecursor.moveToFirst()) { do{ // taking info from row in table int id = tablecursor.getInt(sqliteDB.ID_COLUMN); String name= tablecursor.getString(sqliteDB.NAME_COLUMN); String description= tablecursor.getString(sqliteDB.DESCRIPTION_COLUMN); byte[] image= tablecursor.getBlob(3); tablefromDB.add(new ProductFromTable(id,name,description,image)); // moving until we didn't find last row }while(tablecursor.moveToNext()); } listView = (ListView) findViewById(R.id.tagwriter_listoftags); //as description says // setAdapter = The ListAdapter which is responsible for maintaining //the data backing this list and for producing a view to represent //an item in that data set. listView.setAdapter(customAdapter); } I put the info from row tho objects which are stored in list. I read tones of question but I can't find any solution for me. Everything works when I put the sample image ( which is stored in app res folder ). Thx for any advice

    Read the article

  • Moving the Gallery view to the next image on one swipe in Android?

    - by sunil
    Hi All, I have four images in the Gallery View. When we do swipe from left to right or right to left the Gallery View moves all the images i.e if I swipe from left to right from the first image then it will move to all the four images. What I want is that when I swipe it should only move to the next image. Can someone let me know how is this possible? Hope to get a reply soon. Regards Sunil

    Read the article

  • ImageView place at center on click in gallery view

    - by TGMCians
    i used gallery view in which i place multiple imageview dynamically but on click imageview place at center and second question how to start first imageview from left of screen. I do not want to change the place until user scroll horizontally by finger . Is there any way to achieve this. Please help for this.. private class ImageAdapter extends BaseAdapter{ public ImageAdapter() { //To set blank at bottom and make visible TextView textView = (TextView)findViewById(R.id.textView2); textView.setVisibility(View.VISIBLE); //To set the visibility visible of gallery myGallery.setVisibility(View.VISIBLE); } public int getCount() { return ProductItemArray.Image_URL.length; } public Object getItem(int position) { return null; } public long getItemId(int position) { return 0; } public View getView(int position, View arg1, ViewGroup arg2) { ImageView bottomImageView = new ImageView(context); if(Helper.isTablet(context)) bottomImageView.setLayoutParams(new Gallery.LayoutParams(VirtualMirrorActivity.convertDpToPixel(100, context), VirtualMirrorActivity.convertDpToPixel(100, context))); else bottomImageView.setLayoutParams(new Gallery.LayoutParams(VirtualMirrorActivity.convertDpToPixel(80, context), VirtualMirrorActivity.convertDpToPixel(80, context))); UrlImageViewHelper.setUrlDrawable(bottomImageView, ProductItemArray.Image_URL[position]); bottomImageView.setBackgroundResource(R.layout.border); return bottomImageView; } } myGallery.setAdapter(new ImageAdapter()); myGallery.setSelection(1); myGallery.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, final int position, long arg3) { linearLayout.removeView(frameImageView); Thread newThread = new Thread(new Runnable() { public void run() { URL url_1 = null; try { isAlreadyExistInWishlist = false; VMProductListPaging.productUrl = ProductItemArray.Image_small_URL[position]; VMProductListPaging.productId = ProductItemArray.productId[position]; VMProductListPaging.productName = ProductItemArray.product_Name[position]; url_1 = new URL(ProductItemArray.Image_small_URL[position]); bmp = BitmapFactory.decodeStream(url_1.openConnection().getInputStream()); isExecuted = true; bitmapHandler.sendMessage(bitmapHandler.obtainMessage()); } catch (Exception e) { //Toast.makeText(context,"Sorry!! This link appears to be broken",Toast.LENGTH_LONG).show(); } } }); newThread.start(); } }); Layout.xml <Gallery android:id="@+id/galleryView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:spacing="5dp" android:layout_below="@+id/sendPhoto" android:layout_marginTop="10dp" android:visibility="gone"/>

    Read the article

  • Slick2D - Cannot instantiate the type Image

    - by speakon
    I am getting this strange error and I cannot for the life of me figure out why: Cannot instantiate the type Image CODE: import java.awt.Image; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.SlickException; import org.newdawn.slick.state.BasicGameState; import org.newdawn.slick.state.StateBasedGame; public class MainMenuState extends BasicGameState { int stateID = -1; Image background = null; Image startGameOption = null; Image exitOption = null; float startGameScale = 1; float exitScale = 1; MainMenuState( int stateID ) { this.stateID = stateID; } public int getID() { return stateID; } public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { try { background = new Image("data/menu.jpg"); Image menuOptions = new Image("data/menuoptions.png"); startGameOption = menuOptions.getSubImage(0, 0, 377, 71); exitOption = menuOptions.getSubImage(0, 71, 377, 71); }catch (SlickException e) { System.err.print(e); } } public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException { } public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { } } Why do I get this error? I've googled endlessly and nobody else has it, this worked fine in my other game. Any ideas?

    Read the article

  • Why does my Android App crash when loading image from gallery the 2nd time?

    - by Sebastian
    Hi folks, I've written an app, thats loading images either using the android gallery app or by taking a photo using the cam. When I now load an image using the gallery, everything is fine. When the code is being executed a second time (for loading another image), the application crashes. try { Uri data = intent.getData(); ContentResolver cr = this.getContentResolver(); Bitmap mBitmap = null; mBitmap = Media.getBitmap(cr, data); imageView.setImageBitmap(mBitmap); } catch(Exception e){ showToast(this, "Failed loading image from gallery"); return; } The code crashes at the line mBimap = Media.getBitmap(cr, data);. Everything is initialized, there are no null values etc. The strange thing is: no exception is thrown, I don't get into the catch block to determine whats going wrong. Does anyone have an idea about this? Am I not allowed to "re-use" the content resolver? Do I have to free it after the first usage or something like this?

    Read the article

  • Reformatting a table based photo gallery to a UL based gallery

    - by mmsa
    I have the following code: var table = $('.photogalleryTable').before('<ul class="photogallery"></ul>') table.find('td a').wrap('<li>').parent().appendTo('ul.photogallery'); table.remove(); This code finds a table with a list of photos and re-codes it to use a unordered list instead. The script works perfectly except for one issue. If there are 2 galleries on a page, the script will grab all of the images and reformat them into one list. Because the CMS I'm using tags each gallery table with .photogalleryTable, I'm not sure how to keep the script from touching the other galleries. What I would like to have happen is have the script re-format the first instance and then move on to the next instance, keeping the list of photos separate Is that possible?

    Read the article

  • android circulate gallery iteration with 10 items.

    - by Faisal khan
    I am using the following customize gallery. I am having static 10 images, i want circulatery gallery which should circlate always should never ends after last item it should auto start by 1 or after first it should auto start from end. public class SizingGallery extends Gallery{ public SizingGallery(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); ImageView selectedChild = (ImageView)getSelectedView(); ImageView iv =(ImageView)child; BrowseMapCategoryRow cr = (BrowseMapCategoryRow)iv.getTag(); if (iv == selectedChild) { selectedChild.setImageResource(cr.getSelectedImgSrc()); }else{ iv.setImageResource(cr.getUnSelectedImgSrc()); } return true; } @Override protected int getChildDrawingOrder(int childCount, int i) { return super.getChildDrawingOrder(childCount, i); } }

    Read the article

  • PHP Scale image and then create image of specific size

    - by Ronny vdb
    The result I am trying to achieve is that the user can upload an image of any size, and the server side script will convert it to an image that has the dimension 1024x512. To save the aspect ratio of the image I first scale the image down by either the width or height to match the wanted dimensions. to do this I am using imagecopyresampled(): imagecopyresampled( $new_img, $src_img, $dst_x, $dst_y, 0, 0, $new_width, $new_height, $img_width, $img_height ) && $write_image($new_img, $new_file_path, $image_quality); If we take an image that is 1920x1200 as an example, the outputted image will be 819x512. However I still need a final result of 1024x512 so I want to add white borders to the image to will the width to 1024. How can I correct my imagecopyresampled function to acheive this?

    Read the article

  • JQuery image gallery non functional fade effects

    - by Robin Knight
    Here is a simple image gallery script for fading in and out divs with background images. It is slow and not working properly. It would appear all images are appearing and disappearing together without any animation This gallery should fade each image out into the next one function gallery() { timerp = window.setInterval(function() { $('.cornerimg').fadeOut(2000); if ($('.cornerimg:visible') == $('.cornerimg').last()) { $('.cornerimg').first().fadeIn(2000); } else { $('.cornerimg').next().fadeIn(2000); }; }, 6000); } } Any ideas what has gone wrong with it?

    Read the article

  • What to learn to make a photo gallery site like this? [closed]

    - by Steven Chen
    I started a Wordpress site for my blog but now I want to start another domain for sharing my photos. I used to use Flickr but it requires you to sign up for Flickr Pro if you want to upload over a certain amount of photos. Since I don't want to pay for that, I'm looking to create a photo gallery site like this: http://10mmgalore.com/ or http://www.shuttermaki.com/ But how do you go about with that? Would I be able to install Wordpress and find a theme like that? And/Or are there any Wordpress plugins that I can install to make it like look like that? Or do I need different tools and platforms asides from Wordpress? So can someone list the features, tools and information that I need to make a photo gallery site? The main functions that I want for my site is to have a picture in the middle and when the user clicks on the photo, it goes to the next photo; or there are left and right arrows that users can click to the next photo. I just want to create an album website for my 365 days project (a photo a day). It doesn't have to be as fancy as the sites mentioned above. Thank you!

    Read the article

  • Error loading PCX image in FreeImage library

    - by khanhhh89
    I'm using FreeImage in C++ for loading texuture from the PCX image. My FreeImage code is as following: FREE_IMAGE_FORMAT fif = FIF_UNKNOWN; //pointer to the image data BYTE* bits(0); fif = FreeImage_GetFileType(m_fileName.c_str(), 0); if (FreeImage_FIFSupportsReading(fif)) dib = FreeImage_Load(fif, m_fileName.c_str()); //retrieve the image data bits = FreeImage_GetBits(dib); //get the image width and height width = FreeImage_GetWidth(dib); height = FreeImage_GetHeight(dib); My problem is the width and height variable are both 512, while the bits array is an empty string, which make the following OPENGL call corrupt: glTexImage2D(m_textureTarget, 0, GL_RGB, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, bits); While debugging, I notice that the "fif" variable (which contains the format of the image) is JPEG, while the Image is actually PCX. I wonder whether or not the FreeImage recognize the wrong format (from PCX to JPEG), so tha the bits array is an empty string. I hope to see your explanation about this problem. Thanks so much

    Read the article

  • Making a non-trivial Image and Video Gallery with a really nice interface

    - by Cawas
    Short part: I'm starting to build an Image and Video Gallery for our intranet. It's pretty much like an image gallery with video thumbnails that play on click. It's just good to keep that in mind because caching and streaming happen in very different ways there. It will serve to browse our reference database, which will also contain searching, tagging and voting. There are 3 features that I need to begin with: Quick preview of thumbnails from each Gallery Fast zoom in / out Animated scrolling Now to the long part, since I can't seem to reduce this: I hope this question belongs here. Maybe people can read this through and identify with it, specially since I expect answers to be pretty specific. The first plan was getting Apple's mobile me gallery as base, because it just so happens to have all those 3 features. If you've never seem it, you should check it out. Move the mouse over each collection and you'll get a nice preview "per pixel". Carousel got a really good scrolling, not just because of the pretty effect. I like it much more than cooliris, but it would be nice to have it in several rows, maybe without the magnifying effect... Then it could be all in the same place with the zoom. The more the features blend-in together, the better. Zooming out with the mouse, scrolling by dragging, once the zoom is really out it becomes a browsing through galleries, with the quick-show preview of each, all properly cached and fast. That'd be perfect. A very compelling interface will be important in this project. Well, my point here is just describing what I need and hope to hear from people with more experience in all that stuff of what's already done and what I'd have to do myself. And how (i.e. which framework to use) to do it. To begin with, I've found a gallery demo and its source code (I think it was from here, but the link seems broken now). I guess it was made in SproutCore, which is what mobileme was based upon. Definitely with JQuery (which already seems a little slow). But I'm still missing two features there: the carousel and the fast zoom (it's just not as slow as the zoom in this demo with cappuccino). Then I've found a supposedly better one with a pretty good and similar zoom, that I'm not sure if it's using any framework and is already in php. Right now it'd be better having just the HTML, no server-side, since I'm building interface first. So, can anyone point directions? There are way too many options! Should I look for another solution closer to what I need, or try and tweak this one? I'm not familiar with any framework at all. Sorry for bringing this question that I will have to answer myself anyway sooner or later and sorry that I couldn't make this smaller. Thanks.

    Read the article

  • Image in Image Algorithm

    - by Paul
    I need an algorithm written in any language to find an image inside of an image, including at different scales. Does anyone know a starting point to solving a problem like this? For example: I have an image of 800x600 and in that image is a yellow ball measuring 180 pixels in circumference. I need to be able to find this image with a search pattern of a yellow ball having a circumference of 15 pixels. Thanks

    Read the article

  • Generate static gallery

    - by theomega
    Hy, I need a (linux/shell) script which does the following: It takes a folder full of jpg-files, generates thumbnails and previews (maybe using imagemagik's convert) and creates a html-page which includes all the thumbnails, opens a preview using something like LightBox and links to the original size. Does somebody know a script which does this? I could write one on my own, but it would save me some time.

    Read the article

  • Issue 57 - DotNetNuke Gallery Module and OWS Skin Objects

    June 2010 Welcome to Issue 57 of DNN Creative Magazine In this issue we show you how to use the DotNetNuke Core Gallery Module. The Gallery module allows you to upload files and present them within albums. You can upload images as well as media files such as music and video files. The Gallery module has many features available such as multiple albums, bulk upload, categorization, slideshow, display templates, voting, downloads, watermark and private gallery. This is a useful module for displaying images and media within your DotNetNuke portal with options for customizing the display to suit your exact requirements. We walk you through step by step how to install, use and fully configure the DotNetNuke Gallery module. Following this we continue the Open Web Studio tutorials, this month we demonstrate how to create a Skin Object from an OWS configuration. We show you how to create a menu and a feedback form using OWS and how to display those OWS applications as Skin Objects within a DotNetNuke skin. To finish, we continue the series of articles on DotNetMushroom Rapid Application Developer (RAD), where we demonstrate some of the new features available in the latest version of DNM RAD, these include: Creating a new data source, creating a linked table, creating a direct query and the new colour coding editor. This issue comes complete with 9 videos. Core Modules: DotNetNuke Gallery Module (7 videos - 57 mins) Module Development Series: How to Create a Skin Object from an OWS Configuration (2 videos - 18 mins) New Features in DNM 01.20.00 View issue 57 to download all of the videos in one zip file DNN Creative Magazine for DotNetNuke Web Designers Covering DotNetNuke module video reviews, video tutorials, mp3 interviews, resources and web design tips for working with DotNetNuke. In 57 issues we have created 587 videos!Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Inline image and caption in article - conform caption's width to image's width

    - by Micah
    Here's my code: <div class="image"> <img src="image.jpg" alt="Image description" /> <p class="caption">This is the image caption</p> </div> Here's my CSS: .image { position: relative; float: right; margin: 8px 0 10px 10px; } .caption { font-weight: bold; color: #444666; } As is above, the caption will conform to the width of div.image. My problem is often the img varies in size, from 100px width to 250px width. I'd like to make the caption width conform to the corresponding width of the image, no matter the size. While I'd love for this to be more semantic as well, I'm not sure how easy it would be to switch p.caption with img. Of course, I'd prefer that method but am taking this a step at a time. Is there some jquery code that I can use to detect the width of the image and add that width as an inline style to the caption tag? Is there a better way to do this? I'm open to suggestions.

    Read the article

  • How to add View to Gallery?

    - by sunil
    Hi, I have multiple ListViews and would like to add those to Gallery. I tried with addView but it is not supported since Gallery view is an AdapterView. Can someone let me know how to go about it? Regards Sunil

    Read the article

  • pop up lightbox gallery

    - by redcoder
    hi, anyone know how to make the gallery just like the autotrader when you click on the car image? It will popup a lightbox when you click on image and have a galleria like gallery. www.autotrader.com

    Read the article

  • Calculating length of objects in binary image - algorithm

    - by Jacek
    I need to calculate length of the object in a binary image (maximum distance between the pixels inside the object). As it is a binary image, so we might consider it a 2D array with values 0 (white) and 1 (black). The thing I need is a clever (and preferably simple) algorithm to perform this operation. Keep in mind there are many objects in the image. The image to clarify: Sample input image:

    Read the article

  • Displaying Image On SmallBASIC

    - by Nathan Campos
    I want to display a image using SmallBASIC. For this I've started by searching on the references, then I found a reference for IMAGE, that is like this: IMAGE #handle, index, x, y [,sx,sy [,w,h]] Then I found another to open files(OPEN): OPEN file [FOR {INPUT|OUTPUT|APPEND}] AS #fileN But I want to know some things: What image types this function can display? There is any real example to use IMAGE?

    Read the article

  • How do i resize image file to optional sizes

    - by shuxer
    Hi I have image upload form, user attaches aimage file, and selects image size to resize the uploaded image file(200kb, 500kb, 1mb, 5mb, Original). Then my script needs to resize image file size based on user's optional size, but im not sure how to implement this feature, For example, user uploads image with one 1mb size, and if user selects 200KB to resize, then my script should save it with 200kb size. Does anyone know or have an experience on similar task ? Thanks for you reply in advance.

    Read the article

  • Image Classification - Detecting an image is cartoon-like

    - by kingb
    I have a large amount of jpeg thumbnail images ranging in size from 120x90 to 320x240 and I would like to classify them as either Real Life-like or Cartoon-like. Are there any applications that will have cartoon classification capabilities? This application should work on Linux, and should take an image path on the command-line and return either 0 or 1 (echo $?).

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >