Search Results

Search found 38856 results on 1555 pages for 'image process'.

Page 43/1555 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • storing image_id after uploading image in article table

    - by Bader
    According to this question i successed to create upload image , but now i need to store the image_id to another table called articles , i do not know if this is correct , but i tried to select the image_id from table image like this $select_image=mysql_query("select image_id from image where image_name = $fileName") or die(mysql_error()); and fetch the result to my article insert query like this $fetch=mysql_fetch_array($select_image); $qeuery=mysql_query("insert into articles (article_name,article_category,article_subcategory,article_body,article_summary,article_tags,article_photo,article_timedate) values ('$article_title','$CategoryID','$ProductID','$article_body','$article_summary','$fetch[image_id]','$time')") or die ('Error, Query Faild'.mysql_error()); is this correct ? the mysql_error keeps saying " Unknown column 'Penguins.jpg' in 'where clause'"

    Read the article

  • Image not loading from cache after it's loaded in an iframe

    - by Amir
    I'm loading an image in an iframe and then (once the iframe is loaded) loading the image on the page. But most browsers seem to be loading the image twice. Why isn't the img tag being loading from the cache? Something like this: var loader = $('<iframe />').appendTo('body')[0]; loader.onload = function() { $('body').append('<img src="' + imgsrc + '" />'); }; loader.src = imgsrc; http://jsfiddle.net/amirshim/na3UA/ I'm using fiddler2 to see the network traffic. In case you want to know why I want to do this, check out this question

    Read the article

  • iPhone: How can you draw a piece of an image

    - by Mark
    Code sample - (void)drawRect:(CGRect)rect { [super drawRect:rect]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); CGContextTranslateCTM(context, 0, self.frame.size.height); CGContextScaleCTM(context, 1.0, -1.0); CGContextDrawImage(context, CGRectMake(0.0, 0.0, self.frame.size.width, self.frame.size.height), [UIImage imageNamed:@"sample.png"].CGImage); CGContextRestoreGState(context); } ================ I would like to copy a certain rect within an image to the context, so not the entire image is drawn but just a piece of the image. Does anyone have a solution for this? I can't find anything on google nor the documentation. I know there are alternatives like: 1. Create a UIView with clipping and then just position the UIImageView within it. 2. Create the UIImageView within the UIScrollView and use content offset. But I think those are lame...

    Read the article

  • How do i use a transparent image in a transparent image using GD?

    - by hogofwar
    I have tried every way I can find but the background is always black. Is there any way to keep the transparency of the first image when GD ises it in PHP? I'm using imagecopymerge to use the image. though i am not sure if this is the right way. imagecopymerge($dest, $char, 0, 0, 0, 0, 150, 300, 100); The image is like so: http://filesmelt.com/dl/draw7.php.png See that the background is black whereas the roginal picture was transparent as the modified picture should be aswell

    Read the article

  • How to Use Local Image with WebService Data

    - by Dishant
    I am Using SOAP WS for getting the Data. I got the four Parameters in Response - Topic_Name, Topic_Id, Topic_ImagePath and Topic_Details. Now I have All the Images of Topic Locally with the same name as i got from the web service for Particular Topic_ID. My question is I want to use Local image instead using the Topic_ImagePath 's Image but the data Must Come From the Web Service. I dont want to use if ..else condition because I have more than 1000 Topics, any one can explain how I get the Path of Local Image and Display it with the Data Comes From the Web Service.. Thanx in Advance.

    Read the article

  • Problems with createImage(int width, int height)

    - by Jonathan
    I have the following code, which is run every 10ms as part of a game: private void gameRender() { if(dbImage == null) { //createImage() returns null if GraphicsEnvironment.isHeadless() //returns true. (java.awt.GraphicsEnvironment) dbImage = createImage(PWIDTH, PHEIGHT); if(dbImage == null) { System.out.println("dbImage is null"); //Error recieved return; } else dbg = dbImage.getGraphics(); } //clear the background dbg.setColor(Color.white); dbg.fillRect(0, 0, PWIDTH, PHEIGHT); //draw game elements... if(gameOver) { gameOverMessage(dbg); } } The problem is that it enters the if statement which checks for the Image being null, even after I attempt to define the image. I looked around, and it seems that createImage() will return null if GraphicsEnvironment.isHeadless() returns true. I don't understand exactly what the isHeadless() method's purpose is, but I thought it might have something to do with the compiler or IDE, so I tried on two, both of which get the same error (Eclipse, and BlueJ). Anyone have any idea what the source of the error is, and how I might fix it? Thanks in advance Jonathan ................................................................... EDIT: I am using java.awt.Component.createImage(int width, int height). The purpose of this method is to ensure the creation of, and edit an Image that will contain the view of the player of the game, that will later be drawn to the screen by means of a JPanel. Here is some more code if this helps at all: public class Sim2D extends JPanel implements Runnable { private static final int PWIDTH = 500; private static final int PHEIGHT = 400; private volatile boolean running = true; private volatile boolean gameOver = false; private Thread animator; //gameRender() private Graphics dbg; private Image dbImage = null; public Sim2D() { setBackground(Color.white); setPreferredSize(new Dimension(PWIDTH, PHEIGHT)); setFocusable(true); requestFocus(); //Sim2D now recieves key events readyForTermination(); addMouseListener( new MouseAdapter() { public void mousePressed(MouseEvent e) { testPress(e.getX(), e.getY()); } }); } //end of constructor private void testPress(int x, int y) { if(!gameOver) { gameOver = true; //end game at mousepress } } //end of testPress() private void readyForTermination() { addKeyListener( new KeyAdapter() { public void keyPressed(KeyEvent e) { int keyCode = e.getKeyCode(); if((keyCode == KeyEvent.VK_ESCAPE) || (keyCode == KeyEvent.VK_Q) || (keyCode == KeyEvent.VK_END) || ((keyCode == KeyEvent.VK_C) && e.isControlDown()) ) { running = false; //end process on above list of keypresses } } }); } //end of readyForTermination() public void addNotify() { super.addNotify(); //creates the peer startGame(); //start the thread } //end of addNotify() public void startGame() { if(animator == null || !running) { animator = new Thread(this); animator.start(); } } //end of startGame() //run method for world public void run() { while(running) { long beforeTime, timeDiff, sleepTime; beforeTime = System.nanoTime(); gameUpdate(); //updates objects in game (step event in game) gameRender(); //renders image paintScreen(); //paints rendered image to screen timeDiff = (System.nanoTime() - beforeTime) / 1000000; sleepTime = 10 - timeDiff; if(sleepTime <= 0) //if took longer than 10ms { sleepTime = 5; //sleep a bit anyways } try{ Thread.sleep(sleepTime); //sleep by allotted time (attempts to keep this loop to about 10ms) } catch(InterruptedException ex){} beforeTime = System.nanoTime(); } System.exit(0); } //end of run() private void gameRender() { if(dbImage == null) { dbImage = createImage(PWIDTH, PHEIGHT); if(dbImage == null) { System.out.println("dbImage is null"); return; } else dbg = dbImage.getGraphics(); } //clear the background dbg.setColor(Color.white); dbg.fillRect(0, 0, PWIDTH, PHEIGHT); //draw game elements... if(gameOver) { gameOverMessage(dbg); } } //end of gameRender() } //end of class Sim2D Hope this helps clear things up a bit, Jonathan

    Read the article

  • The easiest way to draw an image?

    - by Benno
    Assume you want to read an image file in a common file format from the hard drive, change the color of one pixel, and display the resulting image to the screen, in C++. Which (open-source) libraries would you recommend to accomplish the above with the least amount of code? Alternatively, which libraries would do the above in the most elegant way possible? A bit of background: I have been reading a lot of computer graphics literature recently, and there are lots of relatively easy, pixel-based algorithms which I'd like to implement. However, while the algorithm itself would usually be straightforward to implement, the necessary amount of frame-work to manipulate an image on a per-pixel basis and display the result stopped me from doing it.

    Read the article

  • How to make Image Border Even?

    - by SNaRe
    I added 1 pixel border to the image. At the same time I am trying to give radius to the image edges. My problem is since the image is already rounded with photoshop, the border of edges look thinner than it should be You can check it from here. http://jsfiddle.net/fVNgA/ How can I make the border even? img{ -webkit-border-radius: 5px; -moz-border-radius: 5px; border: 1px solid #000; } <img src='http://carantina.com/wp/wp-content/themes/new/images/home_pic1.jpg'>

    Read the article

  • Android add image to button

    - by Christiaan de Jong
    I want to add an image to a Button (no imagebutton, as the particular button can either contain text or an image; plus the imagebutton has the same problem), while still retaining the original android-style button. So adding android:background in the XML doesn't cut it, as that will remove the android default button with rounded corners etc. (android.R.drawable.btn_default) Is this in any way possible? I think one way is to make a 9patch image for the button pressed (one for up and one for down) and onTouch Action_DOWN make a layered background drawable and put that onto the button, and doing the same thing but with another 9patch for onTouch Action_UP, but I think that will decrease the performance of the application substantially, as that will require quite a lot of resource reading and layer merging for all the button clicks (and for my application, that will be quite a lot). Is what I state above correct?

    Read the article

  • Losing a programmer, what steps to take?

    - by Zak
    One of the programmers on our team is leaving for greener pastures. We will be going from 6 to 5. What steps should we take to ensure our development process continues to run smoothly, potentially while integrating in new blood. We are currently working on a short release cycle with iterative development. Design - code - review. The person leaving was the most senior dev on the team, and would often give lots of feedback to the rest of the team, especially during the design phase.

    Read the article

  • How to remove insert image button from Yahoo Rich text editor

    - by Nitz
    Hey Guys, I am using ThickBox 3.1 one one page. Now, there is one problem, i am using one form to open thickbox on the button click event. And i am using yahoo text editor on that form. And in the yahoo rich text editor there is one link of image insert.. but i don't know why its not opening. on click of it. the image insert dialog is not opening. all things are working properly. Why is it not opening? and if is there anyway to only remove the image insert icon from text editor.

    Read the article

  • character matching in grayscale image

    - by maximus
    I made patterns: images with the "A" letter of different sizes (from 12 to 72: 12, 14, .., 72) And I tested the method of pattern matching and it gave a good results. One way to select text regions from image is to run that algorithm for all small and big letters and digits of different sizes. And fonts! I don't like it. Instead of it I want to make something like a universal pattern or better to say: scanning image with different window sizes and select those regions where some function (probability of that there is a character at that window) is more than some fixed value. Do you know any methods or ideas to make that function? It must work with original image (grayscale).

    Read the article

  • copying the contents of an image file

    - by Ganesh
    I am designing an image decoder and as a first step I tried to just copy the using c. i.e open the file, and write its contents to a new file. Below is the code that I used. while((c=getc(fp))!=EOF) fprintf(fp1,"%c",c); where fp is the source file and fp1 is the destination file. The program executes without any error, but the image file(".bmp") is not properly copied. I have observed that the size of the copied file is less and only 20% of the image is visible, all else is black. When I tried with simple text files, the copy was complete. Do you know what the problem is?

    Read the article

  • How to get an image onmouseover

    - by udaya
    Hi I am using an image by default But i need the image only when i am doing my mouse over option This is the div In which Ihave the image <div style="float:left; height:90px; width:90px; background-color:#CCCC99" style="display:block" onmouseover="return mouseOver();" > <img src=<?=base_url()?>images/m11on.gif name=b1 width=90 height=80 border=0 onmouseover=mouseOver() onmouseout=mouseOut()></div> On mouse out my div must be empty This is the javascript function i am using but it doesnt seems to work properly

    Read the article

  • PHP find if file data is an image

    - by Christian Sciberras
    Imagine I have some file data in a variable $data. I need to determine whether it is an image or not. No need for details such as corrupt images etc. Firs thought would be getting the file mime type by looking at the magic number and then see whether "image" is in the mime type. No such luck, even if I have a "file extension to mime type" script, I don't have a reliable way to get mime from magic number. My next option was to have a reasonable list of image file magic numbers and consult them. However, it relatively difficult to find such magic numbers (gif for instance has different magic numbers, some of which could pretty rare - if memory serves me right). A better idea would be some linux program which can do this kind of thing. Any ideas? I'm running RHEL and PHP 5.3. I've got root access - ie able to install stuff if needed. - Chris.

    Read the article

  • loading an image from a package in Java (JFrame)

    - by Shahar Kazaz
    i'm having a problem loading an image from a package i created in the project that was set to contain images, i have to write the whole picture location in the computer instead of just the package that contains it. i've tried several things but nothing seams to work... where is the command i use to load the image : searchBar = ImageIO.read(new File("C:\\Users\\ASUS\\Documents\\NetBeansProjects\\Project\\src\\Images\\search.jpg")); "Images" is a package in my project , this works, but when i try loading the image without the "C:\..." only with the "\Images..." it doesn't , so i have to change it every time i open this project in another computer. hopefully one of u has the answer for me , thanks in advance for any answer :)

    Read the article

  • Help with getting data from resized image.

    - by nick
    I'm using an ASP.NET file upload control and then resizing an image and storing the new image in a new Bitmap. Here is the code I have so far: protected void ResizeImage() { Bitmap originalBMP = new Bitmap(FileUpload1.FileContent); //Calculate new image dimensions int origWidth = originalBMP.Width; int origHeight = originalBMP.Height; int sngRatio = origWidth / origHeight; int newWidth = 100; int newHeight = newWidth / sngRatio; Bitmap newBMP = new Bitmap(originalBMP, newWidth, newHeight); } I'm uploading directly to Amazon S3 and I need to pass some data to its upload method. How do I get the following information from my new bitmap that I have been using with the fileupload?: FileUpload1.FileBytes FileUpload1.FileBytes.Length Do I need to save my new bitmap to a stream so I can get an array of bytes?

    Read the article

  • Setting background image in asp.net (Master page)

    - by JRC
    I'm new in asp.net. And I am having trouble setting my background image. Here's the master page source: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Master.master.cs" Inherits="Master"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <link rel="stylesheet" type="text/css" href="scripts/style.css"/> <title>Tracker</title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> </head> <body> <form id="form1" runat="server"> <div> <div class="container"> <a href="#"><img src="images/cross-header.gif" alt="Insert Logo Here" width="100%" id="Insert_logo" style="background: #C6D580; display:block;" /></a> <div class="sidebar1"> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">LINK</a></li> <li><a href="#">LINK</a></li> <li><a href="#"><span style="font-weight:italic">LINK</span></a></li> <li><a href="#"><span style="font-weight:italic">LINK</span></a></li> </ul> </nav> <p>SOME LABEL</p> <p>SOME QUOTE HERE</p> <p></p> </div> </div> <footer> <a href="#">LINK HERE</a> | <a href="#">LINK HERE</a> | <a href="contact.php">CONTACT</a> | <a href="register.php">REGISTER</a> | <a href="login.php">LOGIN</a> <address> Copyright 2012 @JRC </address> </footer> </div> </form> </body> </html> The image that I am trying to use is located at the folder image. I don't know whats wrong. And here's what the style.css source: body { font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif; margin: 0; padding: 0; background-image:url('images/background.jpg'); background-repeat:no-repeat; background-attachment:scroll; background-position:repeat-x; } I also tried this url('image/background.jpeg') etc. but still fails.

    Read the article

  • Multiple threads or process with threads

    - by sergiobuj
    Hi, this is for an assignment so I'm not looking for code. I have to simulate a game where each player has turns and needs to 'pay attention' to what's going on. So far, i know I'll need two threads for each player, one that will sleep until the player's turn and the other paying attention. My question is: Should I work each player as a 'fork' and the threads on the fork, or just create some threads for the player and associate them somehow? It's the first time I've worked with concurrency, semaphores and threads so I'm not sure about the good practices and programming style. Thanks!

    Read the article

  • Grails and Flex build process integration

    - by Dan
    I plan to use Grails and Flex in my next project. I would like to use grails command line to construct my project. This should include the flex part as well, compiling swf, executing FlexUnits etc. I would like to compile and add swf file to war when I do “grails war”. How can I accomplish this?

    Read the article

  • Worker process reached its allowed processing time

    - by Confused
    We are experiencing this issue approximately once a month. It is very hard to pinpoint the cause so any help would be appreciated. This causes the App pool to stop and brings the site down. We have gone through all log files and have concluded nothing. We are using the 2.0.3 version on IIS 6.

    Read the article

  • C# Process flow - Datastream, XML and datagrid

    - by Farstucker
    Im looking for some advice/suggestions on how I should setup the work flow of a small application Im building. When the application is launched the datagrid will be populated via the XML file. Once running the application will receive a datastream that I hope to update the file and datagrid. So Im curious what you would suggest on how I setup the workflow (ie, split the data from the data stream and simultaneously populate the file and grid or would you suggest populating the XML file first and setting up a timer to have the grid read the file?) Im really looking for optimal performance.

    Read the article

  • Excel process not ending in Cluster environment

    - by Vasanth
    When we try to close excel object, it fails to close to cluster environment. The same is working fine in QA and UAT environment. public bool KillExcelProcess() { try { object misValue = System.Reflection.Missing.Value; wbObj.Save(); wbObj.Close(true, misValue, misValue); appC.Workbooks.Close(); appC.Quit(); System.Runtime.InteropServices.Marshal.ReleaseComObject(objSheet); System.Runtime.InteropServices.Marshal.ReleaseComObject(wbObj); System.Runtime.InteropServices.Marshal.ReleaseComObject(appC); wbObj = null; appC = null; } catch (Exception ex) { //throw ex; } finally { System.Threading.Thread.Sleep(5000); GC.Collect(); } return true; Calling function #endregion try { log.Info("CloseExcelService (MeasureSavingsComputeBO) Starts ..."); exConverter.KillExcelProcess(); while (true) { try { File.Delete(strFilename); break; } catch (Exception ex) { } }

    Read the article

  • simple process rollback question

    - by OckhamsRazor
    hi folks! while revising for an exam, i came across this simple question asking about rollbacks in processes. i understand how rollbacks occur, but i need some validation on my answer. The question: my confusion results from the fact that there is interprocess communication between the processes. does that change anything in terms of where to rollback? my answer would be R13, R23, R32 and R43. any help is greatly appreciated! thanks!

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >