Bitmap ^bmp = gcnew Bitmap( img->width, img->height, PixelFormat::Format24bppRgb );
BitmapData^ data ;
data = bmp->LockBits(System::Drawing::Rectangle(0, 0, bmp->Width, bmp->Height), ImageLockMode::ReadWrite, bmp->PixelFormat );
memcpy( data->Scan0.ToPointer(), img->imageData, img->imageSize );
bmp->UnlockBits( data );
this->pictureBox1->Image = bmp;
画像の撮影日時を表示、情報がなければdateTimePickerを表示
Bitmap ^bmap=gcnew Bitmap(fileName);
array
int index = Array::IndexOf(pils, 0x9003);
if(index==-1){
this->dateTimePicker2->Visible = true;
this->dateTimePicker3->Visible = true;
}
else{
PropertyItem^ pi = bmap->PropertyItems[index];
String^ date = System::Text::Encoding::ASCII->GetString(pi->Value, 0, 19);
date = date->Replace(':', '-')->Replace(' ', '_');
this->textBox1->Text = date;
this->textBox1->Visible = true;
}
dateTimePickerに撮影日時を入れれなかった...。StringからDatetimeに変換がうまくできなくてー。
0 件のコメント:
コメントを投稿