@Tim Sir I want to code it using pointers and by far there is no conversion directly from octal to hexadecimal.So it is not dat simple..... @Richard I read books n found out that there is no direct conversion and if u have read it properly i want the code in C not in .NET as the libraries are totally different.
djsproject
Posts
-
Number Conversion Octal to Hexadecimal -
Number Conversion Octal to HexadecimalCan somebody help me to write code for converting a hexadecimal no. to octal no. using pointer in C.I am not getting how to accept a hexadecimal no. from user and how to convert it in to octal equivalent using C.Thanking you in advance.
-
Csharp .Net image processing errorI want the images to be in original size as they were before i dont want them to get small can u suggest something
-
Csharp .Net image processing errorHi I wrote the code for adding image as well as saving the image but whenever I add photos and save them the original size of the photos gets reduced.It takes size of 80,80 I commented the line but still the size of the photos is 80,80 Can somebody pls help......
//to add photos private void btnAddPhotos_Click(object sender, EventArgs e) { openFileDialog.Filter = "Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*"; openFileDialog.Multiselect = true; if (openFileDialog.ShowDialog() == DialogResult.OK) { listView1.View = View.LargeIcon; //imageList.ImageSize = new Size(80, 80); for (int c = 0; c < openFileDialog.FileNames.Length; c++) { Image i = Image.FromFile(openFileDialog.FileNames[c].ToString()); Image img = i.GetThumbnailImage(256, 256, null, new IntPtr()); imageList.Images.Add(img); } listView1.LargeImageList = imageList; int cntl = listView1.Items.Count; if (cntl == 1) { ListViewItem lstItem = new ListViewItem(); lstItem.ImageIndex = 1; listView1.Items.Add(lstItem); } else { for (int j = cntl; j < imageList.Images.Count; j++) { ListViewItem lstItem = new ListViewItem(); lstItem.ImageIndex = j; listView1.Items.Add(lstItem); } } } else { return; } } //to save photos private void btnSavePhotos_Click(object sender, EventArgs e) { clsImageSettings saveFileDia = new clsImageSettings(); clsImageSettings objSaveImage = new clsImageSettings(); FolderBrowserDialog objFolderDai = new FolderBrowserDialog(); string imgPath = ""; if (listView1.Items.Count > 0) { if (objFolderDai.ShowDialog() == DialogResult.OK) { imgPath = objFolderDai.SelectedPath; for (int i = 0; i < openFileDialog.SafeFileNames.Length; i++) { string imgFilePath = openFileDialo
-
error'image_editor.Form1.ComplementImages(System.Drawing.Image)': not all code paths return a value' Can someone tell me whats the error in this code................
-
errors pls help.....I wanted to crop multiple images at the same time.I tried to integrate the code for cropping single image with my code and got messed up.Can somebody help with this code.....
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;namespace batch_image_editor
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}private void splitContainer1\_SplitterMoved(object sender, SplitterEventArgs e) { } private void addphotos\_Click(object sender, EventArgs e) { opend1.Filter = "Image Files(\*.BMP;\*.JPG;\*.GIF)|\*.BMP;\*.JPG;\*.GIF|All files (\*.\*)|\*.\*"; opend1.Multiselect = true; imageList.Images.Clear(); listView1.Items.Clear(); if (opend1.ShowDialog() == DialogResult.OK) { listView1.View = View.LargeIcon; imageList.ImageSize = new Size(50, 50); for (int c = 0; c < opend1.FileNames.Length; c++) { Image i = Image.FromFile(opend1.FileNames\[c\].ToString()); Image img = i.GetThumbnailImage(256, 256, null, new IntPtr()); imageList.Images.Add(img); } listView1.LargeImageList = imageList; for (int j = 0; j < imageList.Images.Count; j++) { ListViewItem lstItem = new ListViewItem(); lstItem.ImageIndex = j; listView1.Items.Add(lstItem); } this.cropToolStripMenuItem.Enabled = true; this.resizeToolStripMenuItem.Enabled = true; this.compressToolStripMenuItem.Enabled = true; this.greyScaleToolStripMenuItem.Enabled = true; this.save.Enabled = true; } }
private void cropToolStripMenuItem_Click(object sender, EventArgs e)
{
listView1.LargeImageList = null;ImageList imgListNew = new ImageList(); for (int i = 0; i < listView1.Items.Count; i++) { if (listView1.Items\[i\].Checked) { frmCropInfo infoForm = new frmCropInfo();
-
saving images in C#After performing operations on mutiple images at the same time(batch image processing) I want to save the images in the same format as the original one.How can I achieve this Can someone pls help.
-
combining 2 codescan someone elaborate more on this.............
-
third party componentscan u give me an example to illustrate more
-
third party componentscan someone tell what third party components are and how can one integrate them in once programs?thanks in advance........
-
combining 2 codeshello everybody i have one csharp .net code that selects multiple images.
string[] extensions = new string[] {"jpg", "gif", "bmp", /*...*/};
foreach (string extension in extensions)
{
FileInfo[] FileJpg = FileDirectory.GetFiles(string.Format("*.{0}", extension));
foreach (FileInfo File in FileJpg)
{
ImageList.Add(File.Name, File.FullName);
checkedListBox1.Items.Add(File.Name);
}
}and a second code that performs rotation on one image.
namespace ImageRotation
{
public partial class Form1 : Form
{
private Image loadedImage;public Form1() { InitializeComponent(); } private Image RotateImage(Image inputImg, double degreeAngle) { //Corners of the image PointF\[\] rotationPoints = { new PointF(0, 0), new PointF(inputImg.Width, 0), new PointF(0, inputImg.Height), new PointF(inputImg.Width, inputImg.Height)}; //Rotate the corners PointMath.RotatePoints(rotationPoints, new PointF(inputImg.Width / 2.0f, inputImg.Height / 2.0f), degreeAngle); //Get the new bounds given from the rotation of the corners //(avoid clipping of the image) Rectangle bounds = PointMath.GetBounds(rotationPoints); //An empy bitmap to draw the rotated image Bitmap rotatedBitmap = new Bitmap(bounds.Width, bounds.Height); using (Graphics g = Graphics.FromImage(rotatedBitmap)) { g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; g.InterpolationMode = InterpolationMode.HighQualityBicubic; //Transformation matrix Matrix m = new Matrix(); m.RotateAt((float)degreeAngle, new PointF(inputImg.Width / 2.0f, inputImg.Height / 2.0f)); m.Translate(-bounds.Left, -bounds.Top, MatrixOrder.Append); //shift to compensate for the rotation g.Transform = m; g.DrawImage(inputImg, 0, 0); } return (Image)rotatedBitmap; } private void trackBar1\_Scroll(object sender, EventArgs e) { if (loadedImage != null) pictureBox1.Image = RotateImage(loadedImage, (double)tRotation.Value); pictureBox1.Refresh(); }
-
Csharp .Net doubt [modified]hey i want this code of rotating image with all the images that i have selected can somebody tell me how to get it done?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;
using System.Windows.Forms;namespace ImageRotation
{
public partial class Form1 : Form
{
private Image loadedImage;public Form1() { InitializeComponent(); } private Image RotateImage(Image inputImg, double degreeAngle) { //Corners of the image PointF\[\] rotationPoints = { new PointF(0, 0), new PointF(inputImg.Width, 0), new PointF(0, inputImg.Height), new PointF(inputImg.Width, inputImg.Height)}; //Rotate the corners PointMath.RotatePoints(rotationPoints, new PointF(inputImg.Width / 2.0f, inputImg.Height / 2.0f), degreeAngle); //Get the new bounds given from the rotation of the corners //(avoid clipping of the image) Rectangle bounds = PointMath.GetBounds(rotationPoints); //An empy bitmap to draw the rotated image Bitmap rotatedBitmap = new Bitmap(bounds.Width, bounds.Height); using (Graphics g = Graphics.FromImage(rotatedBitmap)) { g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; g.InterpolationMode = InterpolationMode.HighQualityBicubic; //Transformation matrix Matrix m = new Matrix(); m.RotateAt((float)degreeAngle, new PointF(inputImg.Width / 2.0f, inputImg.Height / 2.0f)); m.Translate(-bounds.Left, -bounds.Top, MatrixOrder.Append); //shift to compensate for the rotation g.Transform = m; g.DrawImage(inputImg, 0, 0); } return (Image)rotatedBitmap; } private void trackBar1\_Scroll(object sender, EventArgs e) { if (loadedImage != null) pictureBox1.Image = RotateImage(loadedImage, (double)tRotation.Value); pictureBox1.Refresh(); } private void btnLoad\_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) {
-
Csharp .Net doubt [modified]If i click on add photos a new window pops to select a particular folder in whcih images are present.But i cannot select the particular image i have to select the whole folder and the names of these images are then displayed in the checklist box.I want the thumbnails of these images to be displayed in this box.When i will select a particular image it will be displayed in the preview box,There is also a problem here i cannot c the whole image but only a part of it.......I hope this will help u to clear my doubt.
-
Csharp .Net doubt [modified][Message Deleted]
-
Csharp .Net doubt [modified]till now i have put a checkbox and i can select multiple images through it n it is displayed in the preview box but instead of seeing just the name of the images in the checklist box i want the thumbnails of the images to be displayed along with the check button
-
Csharp .Net doubt [modified]i didnt get u @Ben what control means?????
-
Csharp .Net doubt [modified]hello every1, M new to this site so dont know how to post a query here if m wrong do correct me.M making a project in Csharp.Net on batch image processing.I can display multiple images n select it in check box but instead of checkboxes i want the thumbnail of the images to be displayed in the box.Can somebody please help.Thanks in advance......Here is the code that i coded in MS Visual Csharp 2008 express edition
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{Dictionary<string, string> ImageList = new Dictionary<string, string>(); public Form1() { InitializeComponent(); SetStyle(ControlStyles.ResizeRedraw, true); } private void button3\_Click(object sender, EventArgs e) { if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { DirectoryInfo FileDirectory = new DirectoryInfo(folderBrowserDialog1.SelectedPath); //FileInfo\[\] FilesFromDirectory = FileDirectory.GetFiles(); FileInfo\[\] FileJpg = FileDirectory.GetFiles("\*.jpg"); FileInfo\[\] FileGif = FileDirectory.GetFiles("\*.gif"); FileInfo\[\] FileBmp = FileDirectory.GetFiles("\*.bmp"); FileInfo\[\] FileTif = FileDirectory.GetFiles("\*.tif"); FileInfo\[\] FilePng = FileDirectory.GetFiles("\*.png"); foreach (FileInfo File in FileJpg) { ImageList.Add(File.Name, File.FullName); checkedListBox1.Items.Add(File.Name); } foreach (FileInfo File in FileGif) { ImageList.Add(File.Name, File.FullName); checkedListBox1.Items.Add(File.Name); } foreach (FileInfo File in FileGif) { ImageList.Add(File.Name, File.FullName); checkedListBox1.Items.Add(File.Name); } foreach (FileInfo File in FileTif) { ImageList.Add(File.Name, File.FullName); checkedListBox1.Items.Add(File.Name); } foreach (FileInfo