AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.01.2010, 15:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
palleagermark: Create a 64-bit encoded string from an image in AX
Источник: http://palleagermark.blogspot.com/20...rom-image.html
==============

Here's how you can create a 64-bit encoded string from an image in AX:

static void Job4(Args _args)
{
System.Drawing.Image image;
Str string;

System.Byte[] byteArray;
System.IO.MemoryStream memoryStream;
;

// Load the file
image = System.Drawing.Image::FromFile(@"C:\sandbox\test.tif");

// Convert the file to a byte array
memoryStream = new System.IO.MemoryStream();
image.Save(memoryStream, System.Drawing.Imaging.ImageFormat::get_Tiff());

// Create the 64-bit encoded string
string = System.Convert::ToBase64String(memoryStream.ToArray());

// Save it again, to a new image (just for fun or test of you want)
AifUtil::saveBase64ToFile(@"C:\sandbox\test1.tif", string);
}



Источник: http://palleagermark.blogspot.com/20...rom-image.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
mfp: New X++ Editor Blog bot DAX Blogs 2 06.01.2010 02:06
palleagermark: Creating an image file based on plain text from AX Blog bot DAX Blogs 0 03.03.2009 03:08
palleagermark: Channel 9 video: Dynamics AX Version Control interview from Convergence in Copenhagen 2008 Blog bot DAX Blogs 0 30.01.2009 16:05
Microsoft Dynamics CRM Team Blog: 32-bit vs. 64-bit CRM SDK Assemblies Blog bot Dynamics CRM: Blogs 0 11.09.2008 20:05
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 18:26.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.