|
Depends if you want it free or not.
Atalasoft DotImage[^] does lossless JPEG.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
$1000 for an SDK that gives us lossless jpg is not unreasonable, but I'm not the one paying, and the one paying has decreed - find something free. Especially when this is overall an imaging SDK, and my core function is to write imaging code...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ah... Sorry then - I don't know of anything else.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
No worries. I had found that SDK with google, but thanks for the suggestion all the same. I'm dreading finding some open source library in C and trying to get it to bridge to managed C++ in a dll. That's not the way to go, IMO.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Shouldn't you then spend your time on things others don't have?
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
Yeah, that's my theory.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
It's a different compression, but falls under the jpg banner.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: lossless jpg
jpeg is never lossless, so you need another picture format.
'A programmer is just a tool which converts caffeine into code'
|
|
|
|
|
There is in fact a lossless compression which is known as lossless jpg. It is NOT a normal jpg at 100%, I know that is still lossy.
Thanks for taking the time to answer though.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: There is in fact a lossless compression which is known as lossless jpg
I've never heard about this, sorry.
'A programmer is just a tool which converts caffeine into code'
|
|
|
|
|
I'm not sure that it's widely used.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
what i noticed is that when your program crashes or you kill the process etc... (i mean generally situations when appplicaion is being closed in an unnormal way ) notifyicon remains in system tray area. it disappears as soon as you move mouse cursor over it, but if you don't do it it might be there for ages... :]. so my little question is, how to force application to get rid of it in such case. the point is it's not only about my programs, but generally there are many situations when after emergency closure program leaves icon . or perhaps we should force system to refresh its tray? but how to do it? any ideas? thank you in advance
|
|
|
|
|
Explicitly referencing and removing the icon from the tray
// hide icon from the systray
notifyIcon1.Visible = false;
|
|
|
|
|
i know how to hide icon from the tray, but how to do it when crash occurs... literally, i need a place in code where this snippet should be or a general way of handling crashes, process kills etc...
|
|
|
|
|
You can add an event handler for AppDomain.UnhandledException to catch any exception that wasn't handled yet and then remove the icon from the systray.
This also means you have to have access to the notifyicon at this place, what might not be desirable at this moment.
Regards,
mav
|
|
|
|
|
would that work with killing a process? i think that killing doesn't cause any exceptions, nonetheless icon remains in tray in this case as well... hmmmm ... anyway i'll test that. thanx
|
|
|
|
|
No it won't. When you kill the application with taskmanager there's nothing you can do, no event you receive - nothing at all.
But you asked about exceptions, not killing the app.
Regards,
mav
|
|
|
|
|
taskmanager or Process.Kill() function... whatever... i know i didn't ask about that. i mentioned about killing a process but that was not a main point... that's just one of the situations when icon doesn't disappear. it seems that it's some bug in windows. isn't it?
-- modified at 18:39 Sunday 8th January, 2006
|
|
|
|
|
This problem has annoyed me for some time now (in my C++ programs - this problem is language independent). I too think it is a bug in explorer (perhaps an oversight would be a better description). We’ll have to wait for Microsoft to fix this one for us (don’t hold your breath).
This code (in C++) shows how easy it would be for MS to fix this problem:
STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
BOOL Ok = CreateProcess(
"C:\\WINDOWS\\system32\\Notepad.exe",
NULL, NULL, NULL,
FALSE, 0, NULL, NULL,
&si, &pi);
if ( Ok )
{
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
MessageBox(NULL, "Remove icon now!", "Remove icon now!", MB_OK);
}
If you run this program it will start "Notepad.exe" and display a message box when it terminates - No matter how this happens (even if you kill it).
Explorer wouldn't create the process however - It would get the HANDLE to the process from the HWND passed to the Shell_NotifyIcon function.
Steve
|
|
|
|
|
There's no way to clean this up. If your code is stopped by Kill Process, or any other method, that's it, you don't get the chance to kill your icon.
Windows Explorer won't get rid of the icon until the mouse if over it. There's simply no way around this until MS gets around to fixing it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello everyone,
I would appreciate some help on sth that's been bothering me all day today
I'm trying to work with an xml file set as follows:
<object>
<id>
<attribute 2="">
<attribute 3="">
<attribute 4="">
<item>
<item attr1="">
<item attr2="">
<item attr3="">
<item>
<item>
<item attr1="">
<item attr2="">
<item attr3="">
<item>
...
<object>
the idea was to have a single id for each object and as many <item> objects as the user likes.
Even though it looks that the MSVStudio xml editor is able to perfectly distinguish and present two data Tables in a parent-child manner, i hit a wall when i try to do the same programmatically.
What I’ve been trying is:
a. instantiate a dataset,
b. dataset.readxml(…) ... so far so good, i get two tables in my dataset, ("object" & "item")
c. instantiate two datatables, one for object and one for item tables.
but the table "item" contains all the items of every object and i can't seem to find a way to filter them, so i can get only the ones i'm interested every time i.e. the ones nested into a single <object>....
Just to give you some more info about the goal, a form has to be filled, presenting the object attributes on top and the items in a listView at the bottom.
Thanks a lot in advance for any help given.
I’ll post the whole thing if anyone’s interested, if and when I get it!
|
|
|
|
|
sorry about the invisible tag code...
you can have a look at it below...
<object>
<id></id>
<attribute 2></attribute 2>
<attribute 3></attribute 3>
<attribute 4></attribute 4>
<item>
<item attr1></item attr1>
<item attr2></item attr2>
<item attr3></item attr3>
<item>
<item>
<item attr1></item attr1>
<item attr2></item attr2>
<item attr3></item attr3>
<item>
...
<object>
|
|
|
|
|
Hi!
I have two different problems, one in VS'03, second in VS'05...
Well... first I'll show examplatory situation skelleton
<br />
public class Form1 : Form<br />
{<br />
myclass cl1;<br />
myotherclass cl2;<br />
<br />
private void InitializeComponent()<br />
{<br />
cl1 = new myclass (some arguments);
cl2 = new myotherclass();<br />
<br />
cl2.property1 = cl1;<br />
cl2.property2 = new myclass (some arguments);<br />
}<br />
}<br />
I have a control and a custom TypeConverter for it. I use the second one, to choose proper constructor for my control. The code in InitializeComponent is generated properly, the proper constructor is being used. When I compile project, the program works fine, but...
When the Designer recreates form (on project load or after stoping the application which is being designed), it uses default constructor for creating cl1 and in effect, the component is initialized improperly...
The funny thing is, that the control of same type, the cl2.property2 is always properly initialized using non-default constructor
I found a unpleasant solution to it - to init the properties which are set by my constructor again, below, as other properties are... so this constructor works ok only in initialization of cl2.property2 .
So...
I've moved to VS'05 to check if they did sth with this bug...
They did, it works fine now... but...
The cl1 is serialized by designer ok now... but cl2.property2 is no more serialized :/ (cl2.property1 stayed as it was)
Does anyone now the solution for VS'05... or better solution than mine for VS'03?
Regards,
Darek Maciejewski
|
|
|
|
|
Initialise these objects in your own code, not in the compiler generated stuff. The designer thinks it's smart, but it isn't. Especially in VS2005, I spend a lot of time fighting the designer to try and show my forms. At one point, it was actually blowing up the IDE, and the reason way, my control took a Bitmap as a property, and my code checked if the bitmap was NULL, otherwise it would do some image processing on it. The IDE put a bitmap with a pixel format of Unknown in there, something I didn't know existed, and certainly didn't feel I had to check for. Add a check for that, and my IDE stopped crashing. Bizarre.
Christian Graus - Microsoft MVP - C++
|
|
|
|