Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

djsproject

@djsproject
About
Posts
17
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Number Conversion Octal to Hexadecimal
    D djsproject

    @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.

    C / C++ / MFC help tutorial

  • Number Conversion Octal to Hexadecimal
    D djsproject

    Can 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.

    C / C++ / MFC help tutorial

  • Csharp .Net image processing error
    D djsproject

    I want the images to be in original size as they were before i dont want them to get small can u suggest something

    C# csharp help c++

  • Csharp .Net image processing error
    D djsproject

    Hi 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

    C# csharp help c++

  • error
    D djsproject

    'image_editor.Form1.ComplementImages(System.Drawing.Image)': not all code paths return a value' Can someone tell me whats the error in this code................

    C# graphics help

  • errors pls help.....
    D djsproject

    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();
    
    C# csharp c++ linq graphics help

  • saving images in C#
    D djsproject

    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.

    C# csharp help question

  • combining 2 codes
    D djsproject

    can someone elaborate more on this.............

    C# graphics csharp

  • third party components
    D djsproject

    can u give me an example to illustrate more

    C# question

  • third party components
    D djsproject

    can someone tell what third party components are and how can one integrate them in once programs?thanks in advance........

    C# question

  • combining 2 codes
    D djsproject

    hello 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();
        }
    
    C# graphics csharp

  • Csharp .Net doubt [modified]
    D djsproject

    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)
            {
    
    C# csharp database linq graphics help

  • Csharp .Net doubt [modified]
    D djsproject

    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.

    C# csharp database linq graphics help

  • Csharp .Net doubt [modified]
    D djsproject

    [Message Deleted]

    C# csharp database linq graphics help

  • Csharp .Net doubt [modified]
    D djsproject

    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

    C# csharp database linq graphics help

  • Csharp .Net doubt [modified]
    D djsproject

    i didnt get u @Ben what control means?????

    C# csharp database linq graphics help

  • Csharp .Net doubt [modified]
    D djsproject

    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
    
    C# csharp database linq graphics help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups