Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
QuestionWith Asp Running Program Change Excel Setting Pin
khoshrodi13-Mar-11 20:13
khoshrodi13-Mar-11 20:13 
AnswerRe: With Asp Running Program Change Excel Setting Pin
Pete O'Hanlon14-Mar-11 8:03
mvePete O'Hanlon14-Mar-11 8:03 
QuestionHow can i read xml type string from database? Pin
buffering8313-Mar-11 20:02
buffering8313-Mar-11 20:02 
AnswerRe: How can i read xml type string from database? [modified] Pin
Tarun.K.S13-Mar-11 21:59
Tarun.K.S13-Mar-11 21:59 
QuestionGet Remote server sub directories Pin
vishnukamath13-Mar-11 19:46
vishnukamath13-Mar-11 19:46 
AnswerRe: Get Remote server sub directories Pin
JP_Rocks27-Mar-11 0:34
JP_Rocks27-Mar-11 0:34 
QuestionValidate User ID/ password on windows form Pin
shivamkalra13-Mar-11 15:07
shivamkalra13-Mar-11 15:07 
AnswerRe: Validate User ID/ password on windows form Pin
Luc Pattyn13-Mar-11 15:46
sitebuilderLuc Pattyn13-Mar-11 15:46 
GeneralRe: Validate User ID/ password on windows form Pin
shivamkalra13-Mar-11 16:22
shivamkalra13-Mar-11 16:22 
AnswerRe: Validate User ID/ password on windows form Pin
Luc Pattyn13-Mar-11 16:36
sitebuilderLuc Pattyn13-Mar-11 16:36 
GeneralRe: Validate User ID/ password on windows form Pin
GenJerDan13-Mar-11 18:10
GenJerDan13-Mar-11 18:10 
GeneralRe: Validate User ID/ password on windows form Pin
shivamkalra13-Mar-11 20:10
shivamkalra13-Mar-11 20:10 
GeneralRe: Validate User ID/ password on windows form Pin
GenJerDan14-Mar-11 13:14
GenJerDan14-Mar-11 13:14 
GeneralRe: Validate User ID/ password on windows form Pin
shivamkalra14-Mar-11 17:46
shivamkalra14-Mar-11 17:46 
GeneralRe: Validate User ID/ password on windows form Pin
GenJerDan15-Mar-11 3:59
GenJerDan15-Mar-11 3:59 
GeneralRe: Validate User ID/ password on windows form Pin
shivamkalra15-Mar-11 18:01
shivamkalra15-Mar-11 18:01 
QuestionOn paint in tabpage? Pin
Software200713-Mar-11 13:31
Software200713-Mar-11 13:31 
AnswerRe: On paint in tabpage? Pin
Luc Pattyn13-Mar-11 13:35
sitebuilderLuc Pattyn13-Mar-11 13:35 
AnswerRe: On paint in tabpage? Pin
DaveyM6913-Mar-11 13:37
professionalDaveyM6913-Mar-11 13:37 
GeneralRe: On paint in tabpage? Pin
Software200713-Mar-11 13:47
Software200713-Mar-11 13:47 
GeneralRe: On paint in tabpage? Pin
DaveyM6913-Mar-11 13:53
professionalDaveyM6913-Mar-11 13:53 
Questionadd gps info to image Pin
behzadcp13-Mar-11 1:49
professionalbehzadcp13-Mar-11 1:49 
hi guys
i write gps info into image but not display
whats problem
<br />
private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            Image Pic;<br />
            PropertyItem[] PropertyItems;<br />
           <br />
            string FilenameTemp;<br />
            System.Drawing.Imaging.Encoder Enc = System.Drawing.Imaging.Encoder.Transformation;<br />
            EncoderParameters EncParms = new EncoderParameters(1);<br />
            EncoderParameter EncParm;<br />
            ImageCodecInfo CodecInfo = GetEncoderInfo("image/jpeg");<br />
<br />
            double dLat = 38.00000000000;<br />
            double dLong = 48.0000000000;<br />
            string Filename = "E:\\001.jpg";<br />
            byte[] bLat = BitConverter.GetBytes(dLat);<br />
            byte[] bLong = BitConverter.GetBytes(dLong);<br />
<br />
            Pic = Image.FromFile(Filename);<br />
<br />
            PropertyItems = Pic.PropertyItems;<br />
            PropertyItems[0].Id = 0x0002;<br />
            PropertyItems[0].Type = 5;<br />
            PropertyItems[0].Len = bLong.Length;<br />
            PropertyItems[0].Value = bLong;<br />
            Pic.SetPropertyItem(PropertyItems[0]);<br />
<br />
            PropertyItems = Pic.PropertyItems;<br />
            PropertyItems[0].Id = 0x0004;<br />
            PropertyItems[0].Type = 5;<br />
            PropertyItems[0].Len = bLat.Length;<br />
            PropertyItems[0].Value = bLat;<br />
            Pic.SetPropertyItem(PropertyItems[0]);<br />
<br />
            FilenameTemp = Filename + ".temp";<br />
<br />
            EncParm = new EncoderParameter(Enc, (long)EncoderValue.TransformRotate90);<br />
            EncParms.Param[0] = EncParm;<br />
<br />
            Pic.Save("e:\\0001.jpg", CodecInfo, EncParms);<br />
<br />
<br />
        }<br />
        private static ImageCodecInfo GetEncoderInfo(String mimeType)<br />
        {<br />
            int j;<br />
            ImageCodecInfo[] encoders;<br />
            encoders = ImageCodecInfo.GetImageEncoders();<br />
            for (j = 0; j < encoders.Length; ++j)<br />
            {<br />
                if (encoders[j].MimeType == mimeType)<br />
                    return encoders[j];<br />
            }<br />
            return null;<br />
        }<br />


thanks a lot
AnswerRe: add gps info to image Pin
Bernhard Hiller14-Mar-11 0:55
Bernhard Hiller14-Mar-11 0:55 
QuestionMain thread freezing while running a separate thread Pin
ShadowUz12-Mar-11 14:35
ShadowUz12-Mar-11 14:35 
AnswerRe: Main thread freezing while running a separate thread Pin
Luc Pattyn12-Mar-11 15:40
sitebuilderLuc Pattyn12-Mar-11 15:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.