topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 3:49 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vlastimil [ switch to compact view ]

Pages: prev1 2 [3] 4 5 6 7 8 ... 13next
51
Developer's Corner / Re: Why C++ Is Not “Back”
« on: December 02, 2012, 04:46 AM »
Well, I may be biased, but I have a different perspective.

I think C++ is perceived as hard and C# as easy mainly because the tools and libraries used during development. C# has much much better support than plain old C++ in Visual Studio when designing user interface. Also, there is one (tens of megabytes big) core library for C#, but nothing like that for C++. Many C++ developers fear STL and even if they don't, it is only basic algorithms and you may run into binary compatibility if you use it in module interfaces. There is no "one" GUI framework (and MFC sucks).

When actually writing code, C++ does pretty well. In C++11+STL, you don't have to use new/delete at all. You get safety, efficiency and predictability (compared to garbage collection). But how much time is actually spent writing code? When working in C# on a simple tool, I would say that not much. Most of the code is generated and managed for you by the IDE and you only need to fill in a few gaps. That is something no tool currently does for C++ and that is why is it perceived as difficult. If you had to type everything the C# IDE does for you manually, the picture would be different.

Of course, it is easy in C++ to start writing bad code, but is is now also easy to write good one.

52
Thanks for the feedback. RWPaint is not a image viewer/manager (at least not yet), so comfortable browsing of pictures is a problem.

The selection and copy/pasting of images should be possible in the current version, perhaps the commands have unexpected names or are in unexpected locations (selection tools are in the "Magic wand" tool group - the first icon above the canvas; freeform is called "Lasso selection" and there will be "Shape selection" in the future version that would be similar to selecting with Bezier curves in Photoshop). Also, the selected region is represented differently than in other editors (non-selected parts are greyed out).

Flipping and stretching ("Resize (resample)") are in the Image menu. Color adjustments in the Adjust menu and on main toolbar (the half-black, half-white icon).

Artistic effects are indeed missing. There are mainly technical(?) effects like bevel, shadow, outline or glow, but no real artistic effects like crystallize or pointillism.

I am aware that explaining to users how something could be done, if they did not figure it out themselves, is pointless and a sign of a failure of the software. I hope to get better at designing things in the future. Thanks once again for the information about the first impression of the software, it is very important to me.

53
Looks great! What technique does she use?

54
Developer's Corner / Re: Going Over Old Code...
« on: November 22, 2012, 04:35 AM »
Old code almost always looks bad. Software engineering is too young and evolves rapidly. What used to be a good practice 10 years ago is frowned upon now.

Look at the current disputes about object-vs-functional approach to coding. Would all the nice object code we have written in the past decade be totally out of style in 2020? :o

I usually do not refactor just for code's sake. If there is a concrete goal and the old code stands in the way of progress, it gets re-done. But otherwise, I'd just let it live.

55
Living Room / Re: This is one really neat extension ...
« on: November 21, 2012, 11:20 AM »
Sorry to hijack the thread, but for browser navigation with mouse, I have been using one of those mouse-gestures extension for years and I cannot imagine ever living without it. It is kind-of opposite of the extension mentioned by joiwind - it does not save clicks, but instead it frees you from moving the cursor to specific areas on the screen. You can perform a gesture without looking at the cursor. Your hand just memorizes the simple gesture and you don't need to sync your eyes with your hand anymore - bliss. The extension is worth installing even if the only gesture you'll ever learn is "Back" (press RBM, move mouse left, release RBM).

56
I see, so you basically want to have a custom color palette and use it for example with the Pencil tool to modify pixels one by one. There is the "Swatches" panel in the current version, where you can turn off the default color and then add your own color (clicking empty space adds the currently selected color). Alternatively, if you have already drawn something, you can hold down the CTRL key and click on a pixel (while having one of the tools that draw something active), to select the color of the clicked pixel. There is also a list of recently used color to help you.

Though I would not get used to the color swatches too much as I plan to remove that panel from the future version and eventually replace it with something else.

I am sorry I do not understand what you mean by the last sentence.

57
kilele, if I understand you correctly, you would like to have a function that reduces the number of different colors in an image. Something like this is already there, but it is not directly accessible. It is only used when you save to an image format that only supports limited number of colors - for example GIF or some flavors of BMP. I guess it would not be too difficult to make that function available in the main menu with making the number of colors configurable. And thanks for the donation. :)

TaoPhoenix, if you remember what was the problem, I'd love to know

... and BTW, a public beta of the next version is available on my blog. There is some exciting new stuff, mainly redesigned color/fill-style pickers and support for vector layers.


58
Now that you have added the link to the examples for what you meant by spritesheet creation, I understand better what you meant by that. The function to place animation frames on one canvas is already there. Open an animation and go to Animation->Create filmstrip and then select the maximum number of columns.

59
Glad you liked it. There is no explicit limit for the size of an animation, but because all is kept in memory, there is an indirect limiting factor - the bigger the image size, the less frames may be added.

Regarding the suggestions, some of them may be possible in the current version, because you can create your own JavaScript-ed operations (except regular plug-ins). Perhaps you can also find some Photoshop's .8bf plug-ins that would do what you need.

Changing active frame with arrow keys may also be possible via a pair of JavsScript-ed operations, but that may interfere with some drawing tools (because when you for example draw an ellipse, you can use the arrow keys to move it).

60
Thanks for the mention  :)

61
Living Room / Re: ArsTechnica hand-on review of Surface RT
« on: October 26, 2012, 09:52 AM »
Exactly the same limitation goes for all iPad models.
Or most Android tablets for that matter. Advantage of Android is that there are several variations (aka custom ROMs) available, but usually not when these tablets are introduced.

There are Android ROM's available for a few older Windows Mobile 6.x phones, so let's wait and see :)

Well, Apple is Apple. They more or less started the tablet madness and were smart/moral-less enough to close the new platform. I'll simply ignore them (never had any iPhone nor iPad).

Although I do not own Android tablet, there seem to be a lot of various guides on how to install apps not in the Google store on your Android phone or tablet. These ways may be much less comfortable than using the store, but they are clean, legal ways and no hacks. So, I do not consider Android closed.

Now comes WinRT. On tablets with Windows RT totally closed, on x86 desktops with normal Windows 8, partially closed (you can run legacy any apps, but only Ms approved new apps). That is a new thing - closing desktops. That irritates me a lot. Mainly because the WinRT API looks pretty good compared to iPad's or Android's API. I would love to use it to make Metro app, but under the current conditions, I refuse.

62
Living Room / Re: ArsTechnica hand-on review of Surface RT
« on: October 26, 2012, 09:16 AM »
IIUC, Surface with Windows RT => ARM chip => no legacy apps & no other operating systems...

Exactly. Surprisingly, this major drawback is not mentioned in a good number of Surface reviews. Are reviewers really not bothered by the closeness of WinRT?

63
I think I can live with the touch UI, lack of Start button and all that - it may be even better than Win7 after one gets used to it. But the real show stopper is the Microsoft store, namely its closeness. Since I won't be able to create Metro/Modern UI app and distribute it without Microsoft's approval, I'll simply not even try to develop an app and jump through all the loops. And since Win8 makes me feel bad as a developer, it makes me feel bad as a user. I was actually considering buying Surface as my first tablet, but due to the Microsoft Store policy, I will not be getting one and I won't recommend it. You were so close, Microsoft...

64
Announce Your Software/Service/Product / Re: Photo Scanner 2.2.1
« on: October 22, 2012, 09:09 AM »
That tool looks very nice. Coincidentally, I have run into similar problems lately while cropping photographed pictures. Simple perspective removal was not good enough in some case, because the crappy, tiny lens of some digital cameras (and I suppose every smartphone) actually turn straight lines into curves  :(.

Here is a provocative suggestion: What if you dropped the interior control handles and only had 4 handles in the corners and 2 addition handles on each edge? That would make the set up from user perspective much simpler. The actual algorithm would surely get much more complicated, but it may be worth the trouble. (I presume, you are using a Bezier transform or something similar now.) If the application made the assumption that the region the user designated is physically rectangular, I believe the would be a way to figure out a good transformation automatically. It will be quite hard to program, but the best things are never easy.

65
Modifying the operation to only downscale is not too hard, but maybe I should explain how it works instead of posting these black-boxes (Normalize icon 2 is still attached) so that people may customize the behavior as they need. The "Normalize icon" contains this piece of JavaScript (I said it before, but let's mention it again: the configuration window does not work correctly on 64-bit Windows in the current version of the application. Other may access it by pressing the Configure button):

Code: Javascript [Select]
  1. var sizesTx = Configuration.GetValue("sizes");
  2. var depthsTx = Configuration.GetValue("depths");
  3. var sizes = sizesTx.split(',');
  4. var depths = depthsTx.split(',');
  5.  
  6. var icon = Document.Icon;
  7. var formats = icon.FormatIDs;
  8.  
  9. // add missing images
  10. for (var s = 0; s < sizes.length; ++s)
  11. {
  12.         var size = parseInt(sizes[s]);
  13.         for (var d = 0; d < depths.length; ++d)
  14.         {
  15.                 var depth = parseInt(depths[d]);
  16.  
  17.                 // is image missing?
  18.                 var present = false;
  19.                 for (var i = 0; !present && i < formats.length; ++i)
  20.                 {
  21.                         var format = formats[i];
  22.                         present = format.SizeX == size && format.SizeY == size && format.ColorDepth == depth;
  23.                 }
  24.                 if (present)
  25.                         continue;
  26.  
  27.                 // find best source format
  28.                 var oldFormat = null;
  29.                 var bestScore = -1;
  30.                 for (var i = 0; i < formats.length; ++i)
  31.                 {
  32.                         var format = formats[i];
  33.                         var score = 0;
  34.                         score += format.ColorDepth*1000;
  35.                         if (format.SizeX == format.SizeY)
  36.                         {
  37.                                 if (format.SizeX == 2*size)
  38.                                         score += 950;
  39.                                 else if (format.SizeX == 3*size)
  40.                                         score += 900;
  41.                                 else if (format.SizeX == 4*size)
  42.                                         score += 850;
  43.                                 else
  44.                                         score += format.SizeX;
  45.                         }
  46.                         if (score > bestScore)
  47.                         {
  48.                                 bestScore = score;
  49.                                 oldFormat = format;
  50.                         }
  51.                 }
  52.  
  53.                 // create new image
  54.                 var newFormat = icon.CreateFormatID(size, size, depth);
  55.                 icon.InsertImage(newFormat);
  56.                 // copy data
  57.                 var oldImage = Blender.CreateCanvas(oldFormat.SizeX, oldFormat.SizeY, 0);
  58.                 Blender.Compose(oldImage, 0, 0, oldFormat.SizeX, oldFormat.SizeY, icon.GetImage(oldFormat), 0, 0, 0, Blender.OpSrc);
  59.                 var resample = Operation.Create("Raster Image - Resample");
  60.                 resample.Mode = 1;
  61.                 resample.SizeXAbs = size;
  62.                 resample.SizeYAbs = size;
  63.                 Operation.Execute(resample, oldImage);
  64.                 Blender.Compose(icon.GetImage(newFormat), 0, 0, size, size, oldImage, 0, 0, 0, Blender.OpSrc);
  65.         }
  66. }
  67.  
  68. // delete other images
  69. for (var i = 0; i < formats.length; ++i)
  70. {
  71.         var format = formats[i];
  72.         var sizeOK = format.SizeX != format.SizeY;
  73.         for (var j = 0; !sizeOK && j < sizes.length; ++j)
  74.         {
  75.                 var size = parseInt(sizes[j]);
  76.                 sizeOK = size == format.SizeX;
  77.         }
  78.         var depthOK = false;
  79.         for (var j = 0; !depthOK && j < depths.length; ++j)
  80.         {
  81.                 var depth = parseInt(depths[j]);
  82.                 depthOK = depth == format.ColorDepth;
  83.         }
  84.         if (!sizeOK || !depthOK)
  85.                 icon.DeleteImage(format);
  86. }

The section with the "Find best source format" needs to be changed to only consider images larger than the one that is being added. And if no suitable source image is found, the new image is not added. After the modification, it may look like this:

Code: Javascript [Select]
  1. ...
  2.  
  3.                 // find best source format
  4.                 var oldFormat = null;
  5.                 var bestScore = -1;
  6.                 for (var i = 0; i < formats.length; ++i)
  7.                 {
  8.                         var format = formats[i];
  9.                         if (format.SizeX < size || format.SizeY < size)
  10.                                 continue;
  11.                         var score = 0;
  12.                         score += format.ColorDepth*1000;
  13.                         if (format.SizeX == format.SizeY)
  14.                         {
  15.                                 if (format.SizeX == 2*size)
  16.                                         score += 950;
  17.                                 else if (format.SizeX == 3*size)
  18.                                         score += 900;
  19.                                 else if (format.SizeX == 4*size)
  20.                                         score += 850;
  21.                                 else
  22.                                         score += format.SizeX;
  23.                         }
  24.                         if (score > bestScore)
  25.                         {
  26.                                 bestScore = score;
  27.                                 oldFormat = format;
  28.                         }
  29.                 }
  30.                 if (bestScore == -1)
  31.                         continue;
  32.  
  33. ...

I have added just 4 lines - there is one condition within the cycle that is looking for best source image. Smaller image are now skipped. At the end of the cycle, the script checks if a suitable source image was found and if not, the image is not added.

If you have questions related to the 3D part of the editor, asking them on my forum may be better as they will surely be pretty specific and likely not interesting to other DC members.

66
Oh, since you already have the software, here is an updated version of the script. Now it not only deletes extra images, but also create missing images. When creating new image, the source image is the one with the highest color depth and the biggest size, with one exception. If there is an image, that is exactly 2x, 3x, or 4x larger, it is selected as a source image. So for example, if an icon contains 32x32 and 48x48 images and you want it to also have 16x16 and 24x24 images, the 16x16 is created from the 32x32 one and the 24x24 from the 48x48. Image quality tends to be better when the scaling factor is a small integral number.

67

  Mmm, read-ahead cache for slideshow?


Not sure if that is a suggestion or a question, but since part of the next image is displayed on the right side of the window, it is actually pre-loaded when the picture changes (that is, if the connection is not too slow and those few seconds of delay in the slideshow is enough time).

68
N.A.N.Y. 2013 / NANY 2013 Conditional Pledge: Simple picture gallery
« on: October 16, 2012, 05:03 AM »
Hi all,

I am not sure whether this is the right project for NANY or whether it would be useful for anyone at all. So, I pledge to finish this project only if there are 3 people, who pledge to use it. If I cannot find those 3 people in the next month, I'll come with another idea for NANY.

The "Simple picture gallery" (to be named properly) is a set of few PHP scripts for people, who want to run their own small online photo gallery. I know that this is hardly original and there are numerous ways how to present your photos online right now, but let me tell you why I decided to do this. My grandmother started painting after she retired some 20 years ago and during the years, she painted over 100 pictures. This year, we decided it would be nice to have her work presented online. I was searching for a suitable script that we could use, but find nothing that really fit. The free solutions were usually crappy, overcomplicated or hard to navigate. So I (with a little help) made my own script that is:
  • Easy to install - no database required
  • Easy to maintain - pictures are added/deleted via dropbox (but this is a bit hacky right now)
  • Accessible - my grandmother is in her eighties and can navigate the site just fine
  • Pictures are priority, everything else is a distraction
You can check out the gallery in action right now at http://www.linetova.cz/ (best viewed in Chrome, but any decent browser is fine).

This gallery is for people, who want to present a limited amount of carefully prepared pictures to the audience. There are no folders and I do not intend to add them in the near future.

The gallery definitely NOT the right solution for people, who shoot hundreds of photos with their digital camera on every vacation and need a place to dump them to never be seen again.

So, are there 3 people, who would be interested in having such gallery on their web sites? If yes, please reply to this thread - I really need those 3 pledges and I will actually want your websites with photos to be ready and working on Jan 1st so that people can see the script in action and everything is smooth.

69
Here is a script for Mouser that cleans up icons. To use it, go to the Batch pate in RWIconEditor, select "Custom operation #1" or #2 in the "Batch operation" combo-box, then click on Load button and select the file attached to this post after unzipping it.

Then drag and drop icons on the window. As soon as you do that, a window will pop-up, where you can select what sizes and color depths to keep in the .ico file. All other images will be deleted. The result will then be accessible in the lower part of the window. The window will appear each time something is dropped on the application window - if you want multiple icons processed at once, drag and drop them together or drag and drop a folder.

There is a bit of JavaScript in the operation that you can access using the "Configure" button, but unfortunately it does not work correctly on 64-bit editions of Windows (the window nesting depth problem), so don't touch that if you are on 64-bit OS.

Modifying the script to also create images if they are not present in the .ico would not be too hard, but since kunkel321 asked for a free solution, I will not do that right now and get back to playing XCOM  :-*

70
The asteroids spawn positions are predefined. So if you are in a spawn location and one happens to spawn there, you die. I used to have the game reset the ship's position back to the center of the screen where it was safe at the beginning of each level, but I felt that interrupted the flow of the game too much. But maybe it would be better if I put that back in?

Yes, I think resetting the position would be better. At the end of the level, players are focused on destroying the last asteroid and not ready for the fast change of the situation. If you don't want to reset the ship, then maybe adjusting the positions of the asteroids so that they don't collide with the ship for at least a second if no action is taken would be good and letting the new asteroids appear one by one would help too.

71
This captcha can also be very problematic for people, who are not fluent in English. But, I guess, we can always try the adjectives one by one (if we decipher the instructions) and so can the bots.

My opinion remains that captchas are unnecessary and there are better ways to stop robots.

72
No bugs encountered, maybe a little one - when I reached level 3 or 4, the big asteroids appeared relatively close to me or the ship was going too fast and I exploded like 1/2 second after they appeared.

73
Living Room / Re: AWESOMENESS * 99^9999999!!! Meets Douchebaggery.
« on: October 03, 2012, 12:57 PM »
Yes, the self-replication is pretty awesome, but I guess it will take a while until it will be able to print out functional microchips and other electronic parts.

What I also meant was that the social environment on Earth is becoming more and more volatile and that it would be much safer if there were someone on Mars if Earth goes to hell.

74
Living Room / Re: AWESOMENESS * 99^9999999!!! Meets Douchebaggery.
« on: October 03, 2012, 12:32 PM »
When I see stuff like this, my only thought is: Humans really need to go to Mars and establish a permanent colony there. One way, no return module, just pick a few volunteers and keep sending more and more people and material to them. Forget the return capsule. They can return when they build their own rockets.

75
Living Room / Re: What web sites would deserve more attention?
« on: October 01, 2012, 10:11 AM »
It is true that ReactOS has not advanced too much in the past months/years, but it would be great if it succeeded. It is not that easy to kill an open source project. The recent Oracle-Google case about copyright-ability of API and a similar case in EU seem to indicate re-implementing an API is OK, which is a good foundation for ReactOS legitimacy.

Pages: prev1 2 [3] 4 5 6 7 8 ... 13next