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 » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Image tutorial finished...
Image tutorial finished... [message #5249] Mon, 11 September 2006 12:10 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
http://upp.sourceforge.net/srcdoc$Draw$ImgTutorial$en-us.htm l
Re: Image tutorial finished... [message #5335 is a reply to message #5249] Thu, 14 September 2006 02:17 Go to previous messageGo to next message
lindquist is currently offline  lindquist
Messages: 33
Registered: March 2006
Location: Denmark
Member
Very nice work. I will be looking closer at this soon Smile
Re: Image tutorial finished... [message #5380 is a reply to message #5249] Sun, 17 September 2006 16:52 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Mon, 11 September 2006 12:10

http://upp.sourceforge.net/srcdoc$Draw$ImgTutorial$en-us.htm l


Assuming that comments are welcome: Rolling Eyes

2. Image list classes as arrays

I would have appreciated a comment on the origin of I_Circle. It isn't obvious that "iml_header.h" constructs an enum of all images of IMAGEFILE named "I_<name_of_image>". Or is this analysis wrong?

4. Loading Images from file

TIF (TIFF) and PNG files don't seem to work. Although I checked the validity of the respective files the program responded: "No image loaded!" (Yes! I added plugin\tif and plugin\png.)

5. Processing raster images by scanlines
Apart from TIF (TIFF) and PNG files (cmp. #4) BMP files don't work.

Werner
Re: Image tutorial finished... [message #5383 is a reply to message #5380] Sun, 17 September 2006 23:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
2. - thanks!

4, 5, 6 - there is a stupid bug OpenAny unfortunately.

Quick fix:

One<StreamRaster> StreamRaster::OpenAny(Stream& s)
{
	INTERLOCKED_(sAnyRaster)
		for(int i = 0; i < Map().GetCount(); i++) {
			int64 p = s.GetPos();
			One<StreamRaster> raster = (*RasterFactory(Map()[i]))();
			s.ClearError();
			if(raster->Open(s))
				return raster;
			s.ClearError();
			s.Seek(p);
		}
	return NULL;
}



(The problem is that GIF loader uses serialization, which in case the file is not GIF fails and puts the Stream into Error mode. Seek is then not performed).
Re: Image tutorial finished... [message #5402 is a reply to message #5383] Mon, 18 September 2006 15:50 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Sun, 17 September 2006 23:28

2. - thanks!

4, 5, 6 - there is a stupid bug OpenAny unfortunately.

Quick fix:

One<StreamRaster> StreamRaster::OpenAny(Stream& s)
{
	INTERLOCKED_(sAnyRaster)
		for(int i = 0; i < Map().GetCount(); i++) {
			int64 p = s.GetPos();
			One<StreamRaster> raster = (*RasterFactory(Map()[i]))();
			s.ClearError();
			if(raster->Open(s))
				return raster;
			s.ClearError();
			s.Seek(p);
		}
	return NULL;
}



(The problem is that GIF loader uses serialization, which in case the file is not GIF fails and puts the Stream into Error mode. Seek is then not performed).


Thank you very much for your answer. Smile

I re-checked the issue using

- Windows XP,
- MSC8,
- the new 609-dev2,
- your above cited patch.

All problems seem to be solved now except one Sad :

TIF (TIFF) files can neither be opened with Image04 nor can they be edited with Image05. (It goes without saying that this is true even if the "plugin\tif" package is added.) And the TIF (TIFF) files are not to blame: to reinsure this I opened them using Photoshop, GIMP, and IrfanView: no problems!

Werner
Re: Image tutorial finished... [message #5403 is a reply to message #5402] Mon, 18 September 2006 17:03 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Werner wrote on Mon, 18 September 2006 09:50

luzr wrote on Sun, 17 September 2006 23:28

2. - thanks!

4, 5, 6 - there is a stupid bug OpenAny unfortunately.

Quick fix:

One<StreamRaster> StreamRaster::OpenAny(Stream& s)
{
	INTERLOCKED_(sAnyRaster)
		for(int i = 0; i < Map().GetCount(); i++) {
			int64 p = s.GetPos();
			One<StreamRaster> raster = (*RasterFactory(Map()[i]))();
			s.ClearError();
			if(raster->Open(s))
				return raster;
			s.ClearError();
			s.Seek(p);
		}
	return NULL;
}



(The problem is that GIF loader uses serialization, which in case the file is not GIF fails and puts the Stream into Error mode. Seek is then not performed).


Thank you very much for your answer. Smile

I re-checked the issue using

- Windows XP,
- MSC8,
- the new 609-dev2,
- your above cited patch.

All problems seem to be solved now except one Sad :

TIF (TIFF) files can neither be opened with Image04 nor can they be edited with Image05. (It goes without saying that this is true even if the "plugin\tif" package is added.) And the TIF (TIFF) files are not to blame: to reinsure this I opened them using Photoshop, GIMP, and IrfanView: no problems!

Werner




Thanks. This most likely looks like problem in TIF plugin. Frankly, since Tom have adapted it several weeks ago, no one really tested it Smile
Previous Topic: FrameSplitter
Next Topic: upp_608-dev-1_i386.deb
Goto Forum:
  


Current Time: Thu Apr 18 14:12:47 CEST 2024

Total time taken to generate the page: 0.01463 seconds