Search Results

Search found 19064 results on 763 pages for 'image'.

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

  • Multiple ToggleButton image with different highlight image in WPF

    - by Ryan
    I am very new to WPF and needed some pointers as to why this is not working correctly. I am trying to make a maximize button that will change to a restore button when clicked. I thought a toggle button with 2 different styles that would be changed in the code behind could work. I am first trying to get the maximize button working and have ran into a problem. I get the error 'System.Windows.Controls.Image' is not a valid value for the 'System.Windows.Controls.Image.Source' property on a Setter. in my xaml. I seem to be not understanding something completely. Any help would be most helpful :) Ryan <Style x:Key="Maximize" TargetType="{x:Type ToggleButton}"> <Style.Resources> <Image x:Key="MaxButtonImg" Source="/Project;component/Images/maxbutton.png" /> <Image x:Key="MaxButtonHighlight" Source="/Project;component/Images/maxbutton-highlight.png" /> </Style.Resources> <Setter Property="ContentTemplate"> <Setter.Value> <Image> <Image.Style> <Style TargetType="{x:Type Image}"> <Setter Property="Source" Value="{DynamicResource MaxButtonImg}"/> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Source" Value="{DynamicResource MaxButtonHighlight}"/> </Trigger> </Style.Triggers> </Style> </Image.Style> </Image> </Setter.Value> </Setter> </Style> <ToggleButton Name="MaxButton" Width="31" Height="31" BorderThickness="0" Click="MaxButton_Click" Margin="0,0,10,0" Tag="Max" Style="{DynamicResource Maximize}" /> My code behind would do something simple like this: private void MaxButton_Click(object sender, RoutedEventArgs e) { ToggleButton tg = (ToggleButton)sender; if ( tg.IsChecked == true) { tg.Style = (Style)FindResource("Restore"); this.WindowState = WindowState.Maximized; } else { tg.Style = (Style)FindResource("Maximize"); this.WindowState = WindowState.Normal; } }

    Read the article

  • J2ME Reduce Image color-depth/ Compress Image size

    - by updateraj
    Hi, I need to transmit the image from the mobile phone to the server. I am able to reduce the image screen size but not the memory size. I understand i have to deal with the color depth. J2ME does not seem to offer any scaling method which is available in J2SE: image rescaled = image.getScaledInstance(thumbWidth, thumbHeight, Image.SCALE_AREA_AVERAGING); BufferedImage biRescaled = toBufferedImage(rescaled, thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB); How i would i tackle this ? I would like to reduce the image memory size before i transmit to the server. Thank you

    Read the article

  • Convert inline image tags like [image:123:title:size] into HTML img tags

    - by Jacques Joubert
    I am looking for help with regular expression $pattern to convert inline image tags like [image:123:title:size] into HTML img tags. here is the code: //[image:ID:caption:size] $content = '[image:38:title:800x900]'; preg_match_all( '/\[image:(\d+)(:?)([^\]]*)\]/i', $content, $images ); if( !empty( $images[0] ) ) { // There are image inline tags in the content foreach( $images[0] as $i => $tag ) { $link_ID = (int)$images[1][$i]; $caption = empty( $images[2][$i] ) ? '#' : $images[3][$i]; $size = empty( $images[4][$i] ) ? '#' : $images[4][$i]; } echo '<br />'; echo 'ID: '.$link_ID.'<br />'; echo 'Tag: '.$caption.'<br />'; echo 'size: '.$size.'<br />'; } which outputs: ID: 12 Tag: caption:size size: # Any help would be great!

    Read the article

  • how to display a image in java application after downloading the image

    - by Nubkadiya
    i want to display a image after downloading that image from a web-server i have wrote the code for downloading the image. but i cant set it up to a label or any thing other than jframe (because i want to add more buttons and labels to the GUI). here is the code to download the image from the webserver. now i want to set it to a label. please help me URL url = new URL("http://www.personal.psu.edu/acr117/blogs/audrey/images/image-2.jpg"); image = ImageIO.read(url);

    Read the article

  • how to get transform a local image to a web accessable image

    - by hguser
    Hi: Generally,if we want to display a image in the web page,we give the uri of the image resource like: http://host:port/image/xxx.jpg. Now,there are some images in my file system,and I save its absolute path in the db. Like this; id name address image 1 xxxx xxxx C:/images/xxx.jpg Now if the entity is retrived,its image should be displayed in the page. How to make it? What I thought is copy the image under the web server dir,then build its url,then the page can render it. But I wonder if this is a good idea? Is there any other way?

    Read the article

  • What's the best way to learn image processing?

    - by rdasxy
    I'm a senior in college that hasn't done much image processing before (except for some basic image compression on smartphones). I'm starting a research project on machine learning next semester that would require some biomedical image processing. What's the best way to get up to speed with the basics of image processing in about two months? Or is this impractical? It's my impression that once I'm good with the basics learning more from other resources would be easier.

    Read the article

  • How do i bind an image to a <asp:Image /> tag in Form View

    - by Ranhiru
    First i have a getProfileImage.aspx which accepts a CusID and TN as query strings and display n image. So getProfileImage.aspx?CusID=10&TN=Y will show the image fine in the browser :) But... Now i am presented with a Form View and i want to bind the src of the image to get the image from the getProfileImage.aspx page... The following code works fine :) 10 is the customer ID and the image is working fine... <asp:Image ID="Image1" runat="server" Height="151px" ImageUrl='~/getProfileImage.aspx?CusID=10&TN=N' /> But now i want to Bind the CusID value... <asp:Image ID="Image1" runat="server" Height="151px" ImageUrl='~/getProfileImage.aspx?CusID=<%# Bind("CusID") %>&TN=N' /> This simply does not work :( The getProfileImage.aspx is called with CusID=<%... where the way i see it the <%# Bind("CusID") % is not parsed by ASP which would have returned 10... <%# Bind("CusID") %> The above tag alone will work... but inserting it to the middle of the tag seems to break it... Any suggestions ? Thanx a lot in advance :)

    Read the article

  • Reading Character from Image

    - by Chinjoo
    I am working on an application which requires matching of numbers from a scanned image file to database entry and update the database with the match result. Say I have image- employee1.jpg. This image will have two two handwritten entries - Employee number and the amount to be paid to the employee. I have to read the employee number from the image and query the database for the that number, update the employee with the amount to be paid as got from the image. Both the employee number and amount to be paid are written inside two boxes at a specified place on the image. Is there any way to automate this. Basically I want a solution in .net using c#. I know this can be done using artificial neural networks. Any ideas would be much appreciated.

    Read the article

  • Generate image with Drupal imagecache before using imagecache_create_path & getimagesize

    - by ozke
    Hi guys, I'm using imagecache_create_path() and getimagesize() to get the path of a imagecache-generated image and its dimensions. However, if it's the first time we access the page that image doesn't exist yet and imagecache_create_path doesn't generate it either. Here's the code: // we get the image path from a preset (always return the path even if the file doesn't exist) $small_image_path = imagecache_create_path('gallery_image_small', $image["filepath"]); // I get the image dimensions (only if the file exists already) $data_small = list($width, $height, $type, $image_attributes) = @getimagesize($small_image_path); Is there any API method to get the path AND generate the file? In other words, can I generate the image (using a preset) from PHP without showing it in the browser? Thank you in advance

    Read the article

  • How to detect an 'image area' percentage inside an image?

    - by DaNieL
    Mhh, kinda hard to explain with my poor english ;) So, lets say I have an image, doesnt matter what kind of (gif, jpg, png) with 200x200 pixel size (total area 40000 pixels) This image have a background, that can be trasparent, or every color (but i know the background-color in advance). Lets say that in the middle of this image, there is a picture (for keep the example simple lets suppose is a square drawn), of 100x100 pixels (total area 10000 pixels). I need to know the area percentage that the small square fill inside the image. So, in i know the full image size and the background-color, there is a way in php/python to scan the image and retrieve that (in short, counting the pixel that are different from the given background)? In the above example, the result should be 25%

    Read the article

  • Reading Characher from Image

    - by Chinjoo
    I am working on an application which requires matching of numbers from a scanned image file to database entry and update the database with the match result. Say I have image- employee1.jpg. This image will have two two handwritten entries - Employee number and the amount to be paid to the employee. I have to read the employee number from the image and query the database for the that number, update the employee with the amount to be paid as got from the image. Both the employee number and amount to be paid are written inside two boxes at a specified place on the image. Is there any way to automate this. Basically I want a solution in .net using c#. I know this can be done using artificial neural networks. Any ideas would be much appreciated.

    Read the article

  • How to make background image black-and-white?

    - by Dmitri
    Are there any filters that would make background image to be displayed as black-and-white? What I mean, is this: i have a background image set via css using background: url(/image.png); But now I need to apply a filter so that an image is shown as black-white only. Ideally, I would like to also apply opacity to it. The effect I really trying to achieve is to have background image black/white and on hover over that span element the filter would be removed, revealing the color version. And of cause it has to work in FF, Chrome, IE Can someone help me?

    Read the article

  • RGB values from image into a one dimension array in c#

    - by velocityxyz
    I was wondering if there is a was a way to read rgb values from an image into a one dimensional array in C#. If it doesnt make sense, in java I would do something like this. int[] pixels; BufferedImage image = getClass().getResourceAsStream("asdfghjkl.png"); int w = image.getWidth(); int h = image.getHeight(); pixels = new int[w * h]; image.getRGB(0, 0, w, h, pixels, 0, w) ; So any help would be great, or if you can point me in the right direction, that'd be great

    Read the article

  • SFML: Generate a background image

    - by BlackMamba
    I want to generate a background, which is used in the game, on every instance of the game based on certain conditions. To do so, I'm using a sf::RenderTexture and a sf::Texture like this: sf::RenderTexture image; std::vector<sf::Texture> textures; sf::Texture texture; // instantiating the vector of textures and the image not shown here for (int i = 0; i < certainSize; ++i) { if(certainContition) { texture.setTexture("file"); texture.setPosition(pos1, pos2); } else { ... } image.draw(texture); } The point here is that I draw single textures on a sf::RenderTexture, but because textures always are on the graphic cards memory, I can't exceed a certain map size which I have to. I also considered using an sf::Image, but I can't find a way to draw an image (i.e. a texture) to it. The third way I found was using an sf::VertexArray, but this seems to be a bit too low-level for my rather simple purposes. So is there a common way to dynamically generate a background image based on other existing images?

    Read the article

  • WPF / C#: Transforming coordinates from an image control to the image source

    - by Gabriel
    I'm trying to learn WPF, so here's a simple question, I hope: I have a window that contains an Image element bound to a separate data object with user-configurable Stretch property <Image Name="imageCtrl" Source="{Binding MyImage}" Stretch="{Binding ImageStretch}" /> When the user moves the mouse over the image, I would like to determine the coordinates of the mouse with respect to the original image (before stretching/cropping that occurs when it is displayed in the control), and then do something with those coordinates (update the image). I know I can add an event-handler to the MouseMove event over the Image control, but I'm not sure how best to transform the coordinates: void imageCtrl_MouseMove(object sender, MouseEventArgs e) { Point locationInControl = e.GetPosition(imageCtrl); Point locationInImage = ??? updateImage(locationInImage); } Now I know I could compare the size of Source to the ActualSize of the control, and then switch on imageCtrl.Stretch to compute the scalars and offsets on X and Y, and do the transform myself. But WPF has all the information already, and this seems like functionality that might be built-in to the WPF libraries somewhere. So I'm wondering: is there a short and sweet solution? Or do I need to write this myself? EDIT I'm appending my current, not-so-short-and-sweet solution. Its not that bad, but I'd be somewhat suprised if WPF didn't provide this functionality automatically: Point ImgControlCoordsToPixelCoords(Point locInCtrl, double imgCtrlActualWidth, double imgCtrlActualHeight) { if (ImageStretch == Stretch.None) return locInCtrl; Size renderSize = new Size(imgCtrlActualWidth, imgCtrlActualHeight); Size sourceSize = bitmap.Size; double xZoom = renderSize.Width / sourceSize.Width; double yZoom = renderSize.Height / sourceSize.Height; if (ImageStretch == Stretch.Fill) return new Point(locInCtrl.X / xZoom, locInCtrl.Y / yZoom); double zoom; if (ImageStretch == Stretch.Uniform) zoom = Math.Min(xZoom, yZoom); else // (imageCtrl.Stretch == Stretch.UniformToFill) zoom = Math.Max(xZoom, yZoom); return new Point(locInCtrl.X / zoom, locInCtrl.Y / zoom); }

    Read the article

  • Transforming coordinates from an image control to the image source in WPF

    - by Gabriel
    I'm trying to learn WPF, so here's a simple question, I hope: I have a window that contains an Image element bound to a separate data object with user-configurable Stretch property <Image Name="imageCtrl" Source="{Binding MyImage}" Stretch="{Binding ImageStretch}" /> When the user moves the mouse over the image, I would like to determine the coordinates of the mouse with respect to the original image (before stretching/cropping that occurs when it is displayed in the control), and then do something with those coordinates (update the image). I know I can add an event-handler to the MouseMove event over the Image control, but I'm not sure how best to transform the coordinates: void imageCtrl_MouseMove(object sender, MouseEventArgs e) { Point locationInControl = e.GetPosition(imageCtrl); Point locationInImage = ??? updateImage(locationInImage); } Now I know I could compare the size of Source to the ActualSize of the control, and then switch on imageCtrl.Stretch to compute the scalars and offsets on X and Y, and do the transform myself. But WPF has all the information already, and this seems like functionality that might be built-in to the WPF libraries somewhere. So I'm wondering: is there a short and sweet solution? Or do I need to write this myself? EDIT I'm appending my current, not-so-short-and-sweet solution. Its not that bad, but I'd be somewhat suprised if WPF didn't provide this functionality automatically: Point ImgControlCoordsToPixelCoords(Point locInCtrl, double imgCtrlActualWidth, double imgCtrlActualHeight) { if (ImageStretch == Stretch.None) return locInCtrl; Size renderSize = new Size(imgCtrlActualWidth, imgCtrlActualHeight); Size sourceSize = bitmap.Size; double xZoom = renderSize.Width / sourceSize.Width; double yZoom = renderSize.Height / sourceSize.Height; if (ImageStretch == Stretch.Fill) return new Point(locInCtrl.X / xZoom, locInCtrl.Y / yZoom); double zoom; if (ImageStretch == Stretch.Uniform) zoom = Math.Min(xZoom, yZoom); else // (imageCtrl.Stretch == Stretch.UniformToFill) zoom = Math.Max(xZoom, yZoom); return new Point(locInCtrl.X / zoom, locInCtrl.Y / zoom); }

    Read the article

  • apt-get install was interrupted

    - by user3475299
    I am new to Ubuntu. I got the following lines after an interrupted apt-get install. Running depmod. update-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic update-initramfs: Generating /boot/initrd.img-3.13.0-29-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic /usr/sbin/grub-mkconfig: 14: /etc/default/grub: nouveau.modeset=0: not found run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-29-generic.postinst line 1025. No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already dpkg: error processing package linux-image-3.13.0-29-generic (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-29-generic: linux-image-extra-3.13.0-29-generic depends on linux-image-3.13.0-29-generic; however: Package linux-image-3.13.0-29-generic is not configured yet. dpkg: error processing package linux-image-extra-3.13.0-29-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-image-generic: linux-image-generic depends on linux-image-3.13.0-29-generic; however: Package linux-image-3.13.0-29-generic is not configured yet. linux-image-generic depends on linux-image-extra-3.13.0-29-generic; however: Package linux-image-extra-3.13.0-29-generic is not configured yet. dpkg: error processing package linux-image-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 3.13.0.29.35); however: Package linux-image-generic is not configured yet. dpkg: error processing package linux-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-27-generic: linux-image-extra-3.13.0-27-generic depends on linux-image-3.13.0-27-generic; however: Package linux-image-3.13.0-27-generic is not configured yet. dpkg: error processing package linux-image-extra-3.13.0-27-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-signed-image-3.13.0-29-generic: linux-signed-image-3.13.0-29-generic depends on linux-image-3.13.0-29-generic (= 3.13.0-29.53); however: Package linux-image-3.13.0-29-generic is not configured yet. linux-signed-image-3.13.0-29-generic depends on linux-image-extra-3.13.0-29-generic (= 3.13.0-29.53); however: Package linux-image-extra-3.13.0-29-generic is not configured yet. dpkg: error processing package linux-signed-image-3.13.0-29-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-signed-image-generic: linux-signed-image-generic depends on linux-signed-image-3.13.0-29-generic; however: Package linux-signed-image-3.13.0-29-generic is not configured yet. dpkg: error processing package linux-signed-image-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-signed-generic: linux-signed-generic depends on linux-signed-image-generic (= 3.13.0.29.35); however: Package linux-signed-image-generic is not configured yet. dpkg: error processing package linux-signed-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-signed-image-3.13.0-27-generic: linux-signed-image-3.13.0-27-generic depends on linux-image-3.13.0-27-generic (= 3.13.0-27.50); however: Package linux-image-3.13.0-27-generic is not configured yet. linux-signed-image-3.13.0-27-generic depends on linux-image-extra-3.13.0-27-generic (= 3.13.0-27.50); however: Package linux-image-extra-3.13.0-27-generic is not configured yet. dpkg: error processing package linux-signed-image-3.13.0-27-generic (--configure): dependency problems - leaving unconfigured Setting up libxkbcommon-x11-0:amd64 (0.4.1-0ubuntu1) ... Setting up libqt5gui5:amd64 (5.2.1+dfsg-1ubuntu14.2) ... Processing triggers for libc-bin (2.19-0ubuntu6) ... Errors were encountered while processing: linux-image-3.13.0-27-generic linux-image-3.13.0-29-generic linux-image-extra-3.13.0-29-generic linux-image-generic linux-generic linux-image-extra-3.13.0-27-generic linux-signed-image-3.13.0-29-generic linux-signed-image-generic linux-signed-generic linux-signed-image-3.13.0-27-generic E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • Android Image Problem and threshold

    - by Danny_E
    Hey Guys, Long time reader never posted until now. Im having some trouble with Android, im implementing a library called JJIL its an open source imaging library. My problem is this i need to run some analysis on an image and to do so i need to have it in jjil.core.image format and once those processes are complete i need to convert the changed image from jjil.core.image to java.awt.image. I cant seem to find a method of doing this does anyone have any ideas or have any experience with this? I would be grateful of any help. Danny

    Read the article

  • PHP/GD - Cropping and Resizing Images

    - by Alix Axel
    I've coded a function that crops an image to a given aspect ratio and finally then resizes it and outputs it as JPG: <?php function Image($image, $crop = null, $size = null) { $image = ImageCreateFromString(file_get_contents($image)); if (is_resource($image) === true) { $x = 0; $y = 0; $width = imagesx($image); $height = imagesy($image); /* CROP (Aspect Ratio) Section */ if (is_null($crop) === true) { $crop = array($width, $height); } else { $crop = array_filter(explode(':', $crop)); if (empty($crop) === true) { $crop = array($width, $height); } else { if ((empty($crop[0]) === true) || (is_numeric($crop[0]) === false)) { $crop[0] = $crop[1]; } else if ((empty($crop[1]) === true) || (is_numeric($crop[1]) === false)) { $crop[1] = $crop[0]; } } $ratio = array ( 0 => $width / $height, 1 => $crop[0] / $crop[1], ); if ($ratio[0] > $ratio[1]) { $width = $height * $ratio[1]; $x = (imagesx($image) - $width) / 2; } else if ($ratio[0] < $ratio[1]) { $height = $width / $ratio[1]; $y = (imagesy($image) - $height) / 2; } /* How can I skip (join) this operation with the one in the Resize Section? */ $result = ImageCreateTrueColor($width, $height); if (is_resource($result) === true) { ImageSaveAlpha($result, true); ImageAlphaBlending($result, false); ImageFill($result, 0, 0, ImageColorAllocateAlpha($result, 255, 255, 255, 127)); ImageCopyResampled($result, $image, 0, 0, $x, $y, $width, $height, $width, $height); $image = $result; } } /* Resize Section */ if (is_null($size) === true) { $size = array(imagesx($image), imagesy($image)); } else { $size = array_filter(explode('x', $size)); if (empty($size) === true) { $size = array(imagesx($image), imagesy($image)); } else { if ((empty($size[0]) === true) || (is_numeric($size[0]) === false)) { $size[0] = round($size[1] * imagesx($image) / imagesy($image)); } else if ((empty($size[1]) === true) || (is_numeric($size[1]) === false)) { $size[1] = round($size[0] * imagesy($image) / imagesx($image)); } } } $result = ImageCreateTrueColor($size[0], $size[1]); if (is_resource($result) === true) { ImageSaveAlpha($result, true); ImageAlphaBlending($result, true); ImageFill($result, 0, 0, ImageColorAllocate($result, 255, 255, 255)); ImageCopyResampled($result, $image, 0, 0, 0, 0, $size[0], $size[1], imagesx($image), imagesy($image)); header('Content-Type: image/jpeg'); ImageInterlace($result, true); ImageJPEG($result, null, 90); } } return false; } ?> The function works as expected but I'm creating a non-required GD image resource, how can I fix it? I've tried joining both calls but I must be doing some miscalculations. <?php /* Usage Examples */ Image('http://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png', '1:1', '600x'); Image('http://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png', '2:1', '600x'); Image('http://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png', '2:', '250x300'); ?> Any help is greatly appreciated, thanks.

    Read the article

  • Is using the .NET Image Conversion enough?

    - by contactmatt
    I've seen a lot of people try to code their own image conversion techniques. It often seems to be very complicated, and ends up using GDI+ function calls, and manipulating bits of the image. This has got me wondering if I am missing something in the simplicity of .NET's image conversion call when saving an image. Here's the code I have: Bitmap tempBmp = new Bitmap("c:\temp\img.jpg"); Bitmap bmp = new Bitmap(tempBmp, 800, 600); bmp.Save(c:\temp\img.bmp, //extension depends on format ImageFormat.Bmp) //These are all the ImageFormats I allow conversion to within the program. Ignore the syntax for a second ;) ImageFormat.Gif) //or ImageFormat.Jpeg) //or ImageFormat.Png) //or ImageFormat.Tiff) //or ImageFormat.Wmf) //or ImageFormat.Bmp)//or ); This is all I'm doing in my image conversion. Just setting the location of where the image should be saved, and passing it an ImageFormat type. I've tested it the best I can, but I'm wondering if I am missing anything in this simple format conversion, or if this is sufficient?

    Read the article

  • PHP image watermark only displaying image on page

    - by Satch3000
    I am testing a script where I watermark an image in my webpage. The script works fine and the image is watermark but my problem is that only the image is displayed on the page. As soon as I add the script to my page it's like the web page is converted to the image that I'm watermarking. I think it's because of header("content-type: image/jpeg"); from the code. I need to watermark the image on my webpage but I also need the rest of my webpage to be displayed too. How is this done? I'm quite confused on how this works. The script I'm using is from here Here's the code I'm using: <?php $main_img = "Porsche_911_996_Carrera_4S.jpg"; // main big photo / picture $watermark_img = "watermark.gif"; // use GIF or PNG, JPEG has no tranparency support $padding = 3; // distance to border in pixels for watermark image $opacity = 100; // image opacity for transparent watermark $watermark = imagecreatefromgif($watermark_img); // create watermark $image = imagecreatefromjpeg($main_img); // create main graphic if(!$image || !$watermark) die("Error: main image or watermark could not be loaded!"); $watermark_size = getimagesize($watermark_img); $watermark_width = $watermark_size[0]; $watermark_height = $watermark_size[1]; $image_size = getimagesize($main_img); $dest_x = $image_size[0] - $watermark_width - $padding; $dest_y = $image_size[1] - $watermark_height - $padding; // copy watermark on main image imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $opacity); // print image to screen header("content-type: image/jpeg"); imagejpeg($image); imagedestroy($image); imagedestroy($watermark); ?> NOTE: I'm getting the image path from the database so I cannot hardcode the image filename as it's dynamic.

    Read the article

  • Blurred image recovery?

    - by m0s
    I have pictures of handwritten text and some of them are blurred, because the camera was shaky. If someone could point out any techniques that I can use to bring it to readable quality would be great. It is really a closeup, and I'm pretty sure it is doable. If you can recommend a specialized software or you know some techniques in photo-shop or any other software that would help please comment.

    Read the article

  • Rotating images with PHP reduces quality especially over about 10-20 actions

    - by Dylan Cross
    I am using this code below to rotate my jpeg images, the problem is that after around 10-20 times of rotating the image the image is dramatically lower quality, especially blue skies and such, my question is how can I keep these images the same high quality image? There must be a way. I mean, i keep the original image on the server for each image uploaded, and I don't do anything to that, so if need be it, I guess I could always come up with some way of using that over whenever possible.. But would rather not have to. $source = imagecreatefromjpeg($filename); $rotate = imagerotate($source, 90, 0); imagejpeg($rotate, $filename ,100);

    Read the article

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