Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » PNG to IML?
PNG to IML? [message #9299] Thu, 26 April 2007 02:03 Go to next message
adkiller is currently offline  adkiller
Messages: 25
Registered: November 2005
Promising Member
Hi,

How do I import a PNG file into IML? I have an existing PNG file that I would like to use as IML resource. I tried copying and pasting but the alpha data is always lost. IML Designer supports alpha image editing but doesn't seem to support pasting such data from an image editing program.

Any way I can convert PNG files into *.iml?
I am using U++ 2007.1

Thanks,
-Ad

[Updated on: Thu, 26 April 2007 02:04]

Report message to a moderator

Re: PNG to IML? [message #9300 is a reply to message #9299] Thu, 26 April 2007 05:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hm, right you are, this is a problem. Will add "Insert from file.." ASAP.

Mirek
Re: PNG to IML? [message #9301 is a reply to message #9300] Thu, 26 April 2007 05:39 Go to previous messageGo to next message
adkiller is currently offline  adkiller
Messages: 25
Registered: November 2005
Promising Member
Could you please back port it into U++ 2007.1?

Let me know when you do.Thanks very much.

-Ad
Re: PNG to IML? [message #9307 is a reply to message #9301] Thu, 26 April 2007 13:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
adkiller wrote on Wed, 25 April 2007 23:39

Could you please back port it into U++ 2007.1?

Let me know when you do.Thanks very much.

-Ad



No. I will not backport things like this.

Anyway, next "dev" release should be stable enough.

Mirek
Re: PNG to IML? [message #9320 is a reply to message #9307] Thu, 26 April 2007 20:25 Go to previous messageGo to next message
adkiller is currently offline  adkiller
Messages: 25
Registered: November 2005
Promising Member
luzr wrote on Thu, 26 April 2007 19:35

No. I will not backport things like this.

Anyway, next "dev" release should be stable enough.

Mirek


Cool! This is even better. Thanks!
-Ad
Re: PNG to IML? [message #9324 is a reply to message #9320] Fri, 27 April 2007 09:16 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
As I see this problem troubles you:

IconDes/List.cpp

FileSel& IconDes::ImgFile()
{
	static FileSel sel;
	ONCELOCK {
		sel.Type("Image files", "*.png *.bmp *.jpg *.jpeg *.gif");
		sel.AllFilesType();
	}
	return sel;
}

void IconDes::InsertFile()
{
	if(!ImgFile().ExecuteOpen()) return;
	Image m = StreamRaster::LoadFileAny(~ImgFile());
	if(IsNull(m)) {
		Exclamation("Not an image.");
		return;
	}
	ImageInsert("", m);
	EditImage();
}

void IconDes::ListMenu(Bar& bar)
{
	bar.Add("Insert image..", IconDesImg::Insert(), THISBACK(InsertImage))
	   .Key(K_INSERT);
	bar.Add(IsCurrent(), "Image..", IconDesImg::Edit(), THISBACK(EditImage));
	bar.Add(IsCurrent(), "Remove image", IconDesImg::Remove(), THISBACK(RemoveImage));
	bar.Add(IsCurrent(), "Duplicate", IconDesImg::Duplicate(), THISBACK(Duplicate))
	   .Key(K_CTRL_D);
	bar.Add("Insert from clipboard", IconDesImg::InsertPaste(), THISBACK(InsertPaste))
	   .Key(K_ALT_V);
	bar.Add("Insert from file", IconDesImg::InsertFile(), THISBACK(InsertFile))
	   .Key(K_ALT_O);
	bar.Separator();
	bar.Add(IsCurrent() && list.GetCursor() > 0, "Move up", IconDesImg::MoveUp(),
	        THISBACK1(MoveSlot, -1))
	   .Key(K_ALT|K_CTRL_UP);
	bar.Add(IsCurrent() && list.GetCursor() < slot.GetCount() - 1, "Move down", IconDesImg::MoveDown(),
	        THISBACK1(MoveSlot, 1))
	   .Key(K_ALT|K_CTRL_DOWN);
	if(removed.GetCount()) {
		bar.Separator();
		for(int i = removed.GetCount() - 1; i >= 0; i--) {
			Slot& r = removed[i];
			bar.Add("Insert " + sFormatImageName(r.name, r.image, r.exp), r.base_image,
			        THISBACK1(InsertRemoved, i));
		}
	}
}


(Add ImgFile and InsertFile declarations to class too...)

Mirek
Previous Topic: from window to image
Next Topic: DrawImage scaling
Goto Forum:
  


Current Time: Thu Mar 28 19:53:04 CET 2024

Total time taken to generate the page: 0.01477 seconds