Click here to Skip to main content
15,886,724 members
Everything / Image

Image

image

Great Reads

by Colin Vella
This article presents an algorithm and data structures to implement auto-tiling as seen in RPG Maker, the Starcraft level editor, etc.
by bbirajdar
How to embed an image in email body
by Miguel Diaz Kusztrich
A simple way to build a wide family of fractals
by Miguel Diaz Kusztrich
An infinite set of biological shape fractals in the complex plain

Latest Articles

by honey the codewitch
Image Resizer automatically resizes images you drop in a monitored folder based on criteria you give it. It can also change image formats.
by Peter Huber SG
Let the user import, adjust and view images
by spidergeuse
Manipulate WinForms controls to make a simple jigsaw puzzle
by Christian Specht
Overlay gallery images with logo using one of Hugo's available image filters

All Articles

Sort by Score

Image 

7 Sep 2010 by Colin Vella
This article presents an algorithm and data structures to implement auto-tiling as seen in RPG Maker, the Starcraft level editor, etc.
3 Dec 2013 by bbirajdar
How to embed an image in email body
22 Jan 2017 by Miguel Diaz Kusztrich
A simple way to build a wide family of fractals
27 Nov 2017 by Miguel Diaz Kusztrich
An infinite set of biological shape fractals in the complex plain
11 Nov 2012 by OriginalGriff
Don't just load the image - the documentation does say that the file or stream must be available for the duration of the Image instance.Instead, load it from the file, create a new image from it, and then dispose the original: Image im = GetCopyImage(@"D:\Temp\AAAA.jpg"); ...
9 Oct 2016 by Midi_Mick
Alleviate issues with Image objects created from streams and files.
25 Sep 2012 by Grasshopper.iics
Easy Image Inpainting using Local Binary Pattern
5 Jan 2016 by OriginalGriff
Create a UserControl.The way I did mine was to have a "coloured"image and a "monochrome" version of the same picture, and then paint the appropriate parts of each so that the initially monochrome image changed to full colour as the progress completed, but it would be pretty simple to just draw...
12 Apr 2013 by Jonathan Nethercott
Describes an algorithm for calculating the equation of a line in an image using orthogonal linear regression.
10 Dec 2015 by Akash Gutha
Exploring ways to create abstract images in C#
24 Aug 2016 by Isaac RF
To create visually engaging apps, displaying images is a must. Learn to display Bitmaps Efficiently on your Android apps, without giving away performance. The post Displaying Bitmaps Efficiently on Android apps appeared first on Isaac RF.
21 May 2017 by Emiliano Musso
In the present article, we'll analyze some functionalities offered by Microsoft Azure Cognitive Services, and in particular that part of Cognitive Services dedicated to facial recognition (Face API). At the end of the article, the reader will be able to develop a simple C# application to detect face
2 Sep 2012 by Mohamed Mitwalli
Hi , Check this Best RegardsM.Mitwalli
25 May 2019 by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
8 Apr 2016 by V.
Convert FITS file to known image formats and use those images for a "zooming" functionality (image transparency)
5 Aug 2016 by Vincent Maverick Durano
This tip demonstrates how to upload an image to a specified folder within the root of the web application and display the image right away in the Image control after uploading.
4 May 2021 by honey the codewitch
Use an ILI9341 display efficiently from an ESP32 without the Arduino framework. Load JPEGs.
19 Aug 2011 by Wonde Tadesse
Use LinkedResource[^] class to embed an image to your email.
5 Jun 2012 by ErnestoNet
You don't need to create a DC (pMDC). Just use the DC from sm_img (sm_img.GetDC()): CImage img; CImage sm_img; HRESULT res = img.Load(jpgFileName); CDC *screenDC = GetDC(); int iNewWidth = 80; int iNewHeight = 60; sm_img.Create(iNewWidth,...
21 Jun 2012 by OriginalGriff
If you rotate an image, then there are three problems which may affect the image size.1) If you do not rotate it to a width and height which are the same as the original. For example, if you rotate a square image by 45 degrees, the resulting image needs a bigger square in which to sit - and...
18 Feb 2014 by netfed
This article explains how to display images and videos in the very same Fancybox gallery using Json-data and existing html-tags as data
22 Apr 2022 by ADMGNS
A very simple method to resampling points from a digital image and drawing it as antique mosaics, dots (stippling) and Voronoi cells
14 Nov 2023 by Dave Kreskowiak
Wow. So many things wrong in such a small amount of code. Reformatting what you posted so it's readable: Display the Image ...
10 Sep 2010 by alrosan
the idea from your problem takes multiple screen capture every constant time period and compare the images which taken pixel by pixel to select the part of screen was changed and captured it Bitmap image1; Bitmap image2; Graphics gr; private void...
5 Nov 2010 by Gregory Gadow
My approach in the past has been to create a resource library. I wrote an article about two years ago, Share Resources Across Multiple Projects[^], that might be helpful.Basically, you create a DLL project and add all your images (and any other resources you want to share.) Then create a...
3 Dec 2013 by Vangos Pterneas
Kinect and WPF: Getting the raw and depth image using OpenNI.
15 Feb 2011 by Xcelsion
Dear Code Project community,I have a problem with images getting distorted when I try and convert them to a byte[] array using a memory stream. I need this to work because I am trying to create an MJPEG relay server. Using a BinaryWriter object to put the byte[] array on the network stream....
21 Feb 2011 by milantony
Thanks Jaykay832 :-D Your answer was straight forward.double width = image1.ActualWidth; double height = image1.ActualHeight; RenderTargetBitmap bmpCopied = new RenderTargetBitmap((int)Math.Round(width), (int)Math.Round(height), 96, 96,...
4 Mar 2011 by Riaan Booyzen
If you mean after page is loaded on the client, then you can use this ASP.NET Ajax code: (It requires that you have a asp:ScriptManager on the page to enable AJAX)var prm = Sys.WebForms.PageRequestManager.getInstance(); if(prm) prm.add_pageLoaded(...
27 Mar 2011 by Dave Kreskowiak
You cannot specify the resulting binary size of the JPEG. The only way to do what you want would be to incrementally reduce the Quality value and resave the image over and over again until it meets your specification. The problem with this is that you could reduce the Quality so low as to make...
16 Apr 2011 by Albin Abel
You may use different spatial filters for different directions. If you give weights on the vertical for 3 x 3 or 5 x 5 kernel it masks everything but only shows the vertical lines i.e computation of moments will weighted for only one direction. Same way for horizontal, diagonal etc., assign...
10 Oct 2011 by Abhinav S
Try thes links as they are good articles to get you started:Contour Analysis for Image Recognition in C#[^]Image Recognition with Neural Networks[^]As for EMGU download it from sourceforge.net Here.[^] Have a look in the extracted folder and there will be several examples...
22 Dec 2011 by AmirAmirA
I have been doing many different stuff in image processing with C# and I know how to do edge detection , Gaussian Blur and many other things but now im stuck with this one...I have tried different ways to do it and ive gotten close but its not surface blur.Surface Blur: Blurs an image...
21 Sep 2012 by Zoltán Zörgő
You can not do that with pure html/http - since if it has an url, any http client can fetch it, not only a browser. But one can also disable javascript, intercept http traffic and so on.The only option (not totally secure trough) is to use a custom browser plugin or applet (silverlight,...
28 Apr 2013 by Sergey Alexandrovich Kryukov
I think you need to convert the image to black and white by some threshold or similar criterion.If you think at it just a bit, you will understand that this kind if filter cannot be more or less "accurate". It converts one image to another one according some threshold value, but this is you...
4 Jul 2013 by OriginalGriff
No. SQL does not understand images - they are just streams of bytes as far as it is concerned. Creating a thumbnail means understanding not only the image dimensions, but doing some complex processing on the pixel data as well - you have to "understand" image data properly in order to do it.
21 Sep 2013 by OriginalGriff
Well, no, that's not a smart way - for a couple of reasons:Firstly, it'll probably not show any image at all because it sits in a loop changing them and never gets a chance to do the Paint event for anything...Secondly, because if it did show anything, it would be replaced so quickly that...
1 Dec 2013 by Bill_Hallahan
First some background:You wrote:"In an 24bpp type, these values are scanned then converted to byte then assigned to the bitmap image."Every scanner I have seen in a previous job, which included scanners by Canon, HP, Konica Minolta, Toshiba, and more, all scanned color images that...
3 Jan 2015 by Richard J. Algarve
Emgu CV - Select ROI (Region of interest) with the mouse in images that do not have the same measurements. This tip was prepared using the framework Emgu CV and C # .NET language.
21 Oct 2015 by OriginalGriff
Try:string basePath = Path.Combine(@"C:\Users\user\Desktop\Project\Project1\Test\Test\NewProject\StoreImage, panel.HeaderText);if (!Directory.Exists(basePath) { Directory.CreateDirectory(basePath); }MyImageOfAChart.Save(path.Combine(basePath, "MyFileName.jpg"),...
16 Feb 2016 by Jochen Arndt
JPEG uses lossy compression while Portable Network Graphics - Wikipedia, the free encyclopedia[^] uses a lossless compression (DEFLATE algorithm). Therefore, it has no quality parameter (quality is always 100 %).However, the size of PNG images may be optimised by some methods like using a...
27 Jun 2017 by Azim Zahir
This is a demonstration of an Image Gallery App in Android.
21 Feb 2021 by Steffen Ploetz
My best practice approach to change the image of a toolbar button
2 Feb 2022 by Chris Copeland
I think you've got most of the work done there, you just seem to be missing the part of the logic where you get the value from the select box which you can do using the following: # HTML ......
5 Dec 2010 by Alain Rist
Hi Alijman,Your answer is in MSDN: Developing DPI Aware Applications[^].cheers,AR
21 Dec 2010 by Brij
Excel files support embedded images, CSV files do not. So the short answer is: You can't export images.And regarding the HTML table, you can the following jQuery plugin.Click here
19 Jan 2011 by Nish Nishant
Here's an article from Code Project:Uploading / Downloading Pictures to / from a SQL Server[^]By the way, that was in the first page of results from a simple Google search.
15 Feb 2011 by Nish Nishant
Handle the ListBox's SelectedIndexChanged event and update the PictureBox according to the new selection.
21 Feb 2011 by Nuri Ismail
Ed, if you don't want to download anything you could try this[^] free web-based image editor. I've just tested it and converted the white background of my sample PNG image to transparent. I don't know if it is the only way but I've filled the background with transparent color using the 'Paint...
25 Feb 2011 by Monjurul Habib
Try using the following code, hope it will work.HtmlTable tab = new HtmlTable();tab.Border = 1;tab.BorderColor = "#cccccc";HtmlTableRow tr = new HtmlTableRow();HtmlTableCell c = new HtmlTableCell();Image img = new...
24 Mar 2011 by Sergey Alexandrovich Kryukov
This should provide the answer: Clipboard handling with .NET[^].Sorry, it is C#, but if you want to get some good help or code samples, you need to understand at least some of C#; just VB.NET won't help you much.After all, all you need to know is this: use...
17 May 2011 by Sergey Alexandrovich Kryukov
Don't do a big common mistake: don't do your on screen rendering using PictureBox!As much of your work is dynamic rendering of the images on screen, I would avoid using PictureBox at all. (You could use it, but I cannot see where it helps in your case except in eating up extra resources and...
20 May 2011 by Aron Weiler
Make any image in WPF pop up and hit you in the face!
31 May 2011 by CPallini
If you are using System.Drawing then you may create a bitmap of the same size then use the SetPixel method (or, if performance matters, the LockBits one, see Bitmap.Lockbits[^] at MSDN). The straighforward transformation of the RGBA components is the simple multiplication by 64 85 (sorry 64 was...
31 May 2011 by Sergey Alexandrovich Kryukov
First rule. Do not use GetPixel/SetPixel: it's too slow! You can get acceptable performance only when you do it all at once.Do the following. Create empty bitmap of the class System.Drawing.Bitmap and use System.Drawing.Bitmap.LockBits method. For pixelFormat, use...
27 Jun 2011 by TheyCallMeMrJames
Asma, this is no small task and the question you're asking isn't really specific enough for this forum.You can make use of libraries such as AForge.net[^] which will have you on your way down this kind of development, but you'll have to do the heavy lifting on your own.Facial recognition...
11 Jul 2011 by Christian Graus
You can read my image processing[^] articles here on Code Project for information on how to access the underlying bytes of an image in C#.
16 Jul 2011 by thatraja
Here you goFix linksCannot access a closed file[^]ObjectDisposedException - Cannot Access a Closed File[^]ObjectDisposedException - Cannot access a closed file[Solved][^]cannot access a closed file – FileUpload in ASP.NET[^]Read / Write BLOBs from / to Oracleusing C# .NET...
2 Aug 2011 by Sergey Alexandrovich Kryukov
There could not be perfect universal automatic solution to this problem in principle, as you're dealing with insufficient information. Some part of your background image is hidden behind the images of the digits. You should change the digit; and then you need to expose some part of the...
18 Aug 2011 by Jibrohni
Hi all, I have two images on my form, one is a .jpg the other is a .png. What I'm doing is overlaying them to try and create one image that I can then save to a file. I've done a lot of searching on the net but can't seem to find a simple way to do it. I've got the code below which I think...
25 Sep 2011 by ludovicianul
The easiest and elegant way to read images from the database and display them in the UI.
23 Jan 2012 by thatraja
I never worked with that much of images. Looks like a nice project.LinksSave & Read Image From Database[^]Uploading and Storing Image Path to Database and Image to Folder[^]Yep these links are for web application but you need only some changes to migration(Win app).But I prefer...
29 Jan 2012 by Sanju Sanju
Hi All,In my application i need to display some large images which are having size of about 800MB.When im trying to read the Image Using Image img = Image.FromFile(filepath); its showing OutOfMemory error. Please help me. How to read large Images?
20 Mar 2013 by Sergey Alexandrovich Kryukov
The situation is not easy at all. Here is some idea:Take a computer which has enough memory where you can read it. Important: on this stage, you should use uncompressed images. Break the big image into N x M of smaller fragments of some easily managed size and safe these fragments as...
11 Apr 2012 by sravani.v
Refer these may give you some...
13 Jul 2012 by Sandeep Mewara
Object reference not set to an instance of an object This error happens when you try to use a property or call a method of an object that is null. More details: here[^] For now, it seems like:currItem.Item("Picture") or e.DataRepeaterItem.Controls("pbCategory") is Nothing.
24 Jul 2012 by Raghunatha_Reddy_S
...(or)Use CSS. Add to the theme if you're using one, or a CSS file...body { background-image: url(images/image.png);}Best practices recommend having this in a separate file, rather than the head of the document - and...
10 Sep 2012 by Sergey Alexandrovich Kryukov
Please see my comment to the question: of course this is possible and easy, but you need to clarify what is your image.If this is a bitmap, you usually use the class:...
20 Sep 2012 by fjdiewornncalwe
There is no simple way to do this because default tooltips are text only. You'd have to create a custom control to handle this.This CP article may be a good starting point for you: A ToolTip with Title, Multiline Contents, and Image[^]
21 Sep 2012 by Sergey Alexandrovich Kryukov
There is no way. You will understand it yourself, if you get yourself some time to learn how Web works. This is a pure client-server; and everything is done by the HTTP server in response to HTTP requests. At the moment a user can see some picture, it's already on the client side. The user...
21 Sep 2012 by Kenneth Haugland
Whats the problem:http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/1b524a3e-a303-40f8-b1b7-d397fa1f29fb/[^]There a lots more at Google[^].
1 Nov 2012 by Santhosh G_
If GDI functions can be used, you can prepare a memory Dc and attach the captured image to the memory DC. Then Draw the timestamp text to the memory DC, using TextOut or DrawText. After Textout to the memory DC, Read bitmap and it will provide the captured image with the text.1) Prepare a...
16 Nov 2012 by Espen Harlinn
ImageMagick would do the trick, have a look at:ImageMagick: Convert, Edit, Or Compose Bitmap Images[^] and Magick++ C++ API[^] - it's a great package.Best regardsEspen Harlinn
20 Jan 2013 by Sergey Alexandrovich Kryukov
Lets start from the very end: transparency won't be a problem, because PNG bitmaps support transparency: http://en.wikipedia.org/wiki/Portable_Network_Graphics[^].For rendering of something like a control on a bitmap (you actually can render any Visual and hence any control; please see...
28 Apr 2013 by Zoltán Zörgő
As you asked for java solution, I can recommend OpenCV[^]. And here you have a good tutorial about converting an image to binary (black and white) using thresholding, with some theory too: http://docs.opencv.org/doc/tutorials/imgproc/threshold/threshold.html[^]. You will notice, that there is no...
16 May 2013 by Shweta Lodha
Some tips on Windows Phone Apps
27 Jun 2013 by Yassin Souabni
How to conserve ratio and serve optimal fluid images in responsive design
22 Oct 2013 by bjdestiny
hi, try that in give z-index:-1 in background layer div and give z-index:9 to upper layer div. i think it will solve your this problem.
9 Jan 2014 by Matt T Heffron
multiply by 255:grayScale.SetPixel(xCoordinate, yCoordinate, Color.FromArgb((int)(255*redColor), (int)(255*greenColor),(int)(255*blueColor)));
6 May 2014 by Daniel Lieberwirth (BrainInBlack)
This describes a simple way to create interactive, bitmap based, buttons for WinForm applications.
5 Jun 2014 by Sergey Alexandrovich Kryukov
Don't ever draw anything on a PictureBox. This is one of the common mistakes of many beginners confused by this almost useless class, only designed to simplify the most basic graphic chores, like presenting a static image. Even though manipulating with PictureBox is possible, it will give you...
18 Jul 2015 by Frankie-C
A bitmap file have one header more respect the memory bitmap: The BITMAPFILEHEADER[^].Take a look to docs, and add it at very beginning of the file ;).For more info just googling you can find many examples on the net.
15 Sep 2015 by Sergey Alexandrovich Kryukov
This is a plain wrong question, "how differ"? Just learn how this color space works: https://en.wikipedia.org/wiki/Lab_color_space[^].Most questions about "difference" are inherently invalid. If you didn't get it yet, try to tell use the "difference" between apple and Apple. :-)—SA
12 Oct 2015 by bling
I do not know if this will fix all your problems but, try replacing this: array_1D[offset + i+0] = arrayB_2D[j][counter++]; array_1D[offset + i+1] = arrayG_2D[j][counter++]; array_1D[offset + i+2] = arrayR_2D[j][counter++];... with this ... array_1D[offset + i+0] =...
30 Nov 2015 by George Jonsson
You have some strange stuff going on in your code.For example these lines:picturebox1.Image = new Bitmap(Image.FromFile(filepath));Bitmap image1 = new Bitmap(picturebox1.Image);image1.Save(Application.StartupPath + "/CanFiles/" + fileName + ".jpg",...
3 Nov 2017 by Karthik_Mahalingam
try protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Select") // name of the command { var index = Convert.ToInt32(e.CommandArgument); var row = GridView1.Rows[index]; ...
13 Oct 2018 by Steffen Ploetz
How to use GL's pixel buffer object (PBO) to copy one texture to another
8 Feb 2019 by F-ES Sitecore
That's not possible, the server code has no idea if the browser has downloaded the image, and event if it was technically possible you still wouldn't be allowed to do it as it would be a security issue. Further more that information is useless to your server code anyway as even if it did know a...
13 Jul 2021 by Richard MacCutchan
You already posted this question at How to make a scrolling background for a JPanel in java? - Java Discussion Boards[^]. Please do not repost.
19 Nov 2021 by
Image class which contains an array of unique colors with counts used to sort by color and find duplicates.
1 Feb 2022 by Richard Deeming
const output = document.getElementById("output"); for (let i = 1; i
12 Oct 2023 by Richard Deeming
Call SKImage.Encode[^] to return an SKData[^] instance wrapping the encoded image. Then call SKData.AsStream[^] to get a stream wrapping the encoded data. You should then be able to pass that stream to the Image.FromStream[^] method to get a...
3 Aug 2010 by E.F. Nijboer
As far as I can tell that is not the intention of the jpg format. It is intended to compress 24bpp photo's and is optimized for 24bpp images. To convert it into an 8bpp is should actually be converted to another format like gif for example. This is by the way not optimal because gif is optimized...
2 Sep 2010 by Richard MacCutchan
Well how do you propose to achieve this? You have not mentioned what programming language you intend to use, nor what type of image you need to process. The obvious answer is to read the pixels in your image row by row looking for a colour change to find the row and column edges of your shape....
22 Sep 2010 by alrosan
i think this link will be useful for you to understand what means Image Processing and what its applicationshttp://en.wikipedia.org/wiki/Image_processing
24 Sep 2010 by Yasser El Shazly
Hi guysAny one here can help me in learning character recognition?Tip :-I have a picture and i want to recognize text from it .... thanks
28 Sep 2010 by TheyCallMeMrJames
Good opportunity to take on threads and work your machine's processor.Split the image into rows (which should be relatively quick), then put those into a queue. Work on each row with individual threads. Add each image to a collection and persist the collection when all the items are...
28 Sep 2010 by TheyCallMeMrJames
Well, you could alternatively go the lockbits route.Bob Powell has a great (series of) article(s) on the topic(s of GDI, image processing and .NET). Lockbits is here[^].This will require a lower level of processing (and understanding of the image) but should be much faster.Cheers.
28 Sep 2010 by Toli Cuturicu
I found another way myself, using Bitmap.Clone(Rectangle rect):private static int Main(string[] args){ if (args.Length
8 Oct 2010 by Pritesh Aryan
I want to measure object's length through image processing in accuracy of 0.001mm. means 1 pixel = 0.001mm, than how much zooming i need and i have doubt that that much accuracy or zooming is possible? if possible than is there any camera which can give me that much accuracy or zooming?