Archive for July, 2006

Is this ChocoFlopped ? :-) 2

Every now and then I google for ‘ChocoFlop’ just to see what people are saying about it. There are not many links but the one I found surely suprised me. I always thought of the ChocoFlop name as a joke (although I am not changing it anytime soon)… but still, I didn’t expect someone to use the neo-adjective ‘chocoflopped’ to describe his creation using my app.

Well, this photo right here, which BTW looks great, is probably the first of history to have ever been ‘chocoflopped’ ! I mean he not only said it.. he actually created a TAG. I wonder how many people are going to share this tag…

Next thing you know, you’re walking on the street and some guy says:

- You know, those supermodels, they look really weird and deformed, but I think it’s not real. They’re just chocoflopped!

On a side note I discovered it was linked on iUseThis. Nice concept. It’s like digg.com for mac apps. I didn’t know this website actually but it would have saved me some time when I first started using a mac and I needed to know what the ‘right apps’ were. Don’t forget to click the little heart on ChocoFlop :-)

Release Alpha 38 - too many changes to list in the title :-) 0

This time we’ve got a total of 113 points fixed since previous release. Not all are big things though, but that’s quite a change still. Here is a quick summary. As usual the full changelog (hardly readable by humans) is available in Mantis.

- New feature: Select by Color. This still needs some cleaning.

- Mixing values are now correct (eg. black + white = 50% gray). See previous post for more on this. This bug affected all mixing operations previously.

- All filters moved to filters menu (nothing left in ‘image’). They are now organized (separated).

- Edit and Image menu’s positions swapped (so we get File, Edit, Image…)

- Selection bounds scanning (marching ants) rewritten once again.
- Uses much less memory (1 channel)
- It is much faster: separated loops, only scans changed areas,
- It uses several threads to scan different areas simultaneously. Dual CPU/Core users might enjoy a speed boost in this particular feature (you see it when you switch back to/from quickmask mode and selection contour has to be rescanned. The whole thing is now less crashy (thread safe).

- Find visible bounds of pixel renamed to state what it actually does (select *bounds* actually) and optimized like selection bounds scanning. ‘Find visible…’ finds correct area on smaller layers.

- Operations on images with odd sizes are now correct (findvisible / scanmaskbounds / clear or selection).

- Color picker is faster (does not update pick buffer on each mouse move)

- Color picker picks correct color in both floating point and 8 bit mode. Picks calibrated color (no more triangle on swatch). Precise picker is now on correct pixel. Color is updated whlie dragging (not only on release).

- All operations on masks now force gray color on target. Since only green component is used by Apple’s BlendWithMask this is essential. Previously B/W mode was filtered to always look gray even if it had color in it. This means that a layer masked filled with red looked gray when displayed but was actually fully black for the mixing operation.

- Dragging on a selection now uses the same threshold as selection bounds (marchin ants) to know if it is selected or not (if we are inside selection it cuts and drags, otherwise it moves the whole layer).

- Layer limits (green rectangle) can how be hidden.

- Filter preview now look OK in all display modes on layer mask, filter map (previously black and white and overlay modes didn’t show the filter at all or incorrectly).

- Overlay of quickmask over layermask in black and white mode looks ok.

- Undo/Redo does not scan whole selection anymore (restores previously scanned lines).

- Copy from smaller layer pastes on correct position (offset of source layer + offset from selection)

- Brush painting now works correctly on layers that are bigger than images

- Undo is correct for gradients on layers bigger than image.

- Undo after rescale/crop now renders the correct area

- Undo labels are correct for operations that use multiple sub-operations

- Resize/Rotate/Ressample document does not destroy selection anymore.

- Resize/Rotate/Resample document does not set transparent areas in masks anymore (always black)

- Floating point dimensions are not possible anymore for document size (happened after rotation)

- Fixes for crashes when loading multiple layer documents (empty layer list).

- New feature: Add a “Folder layer”. That is a layer without bitmap or filter with no other use than organisation (so far).

- ‘affect all layers’ and ‘hide target layer’ are saved/loaded in .chocoimg files

- Last Filter works across multiple documents.

- Some more memory leaks fixes (copy/backups for cancelling filters).

- New feature: Clear with opacity

- New feature: Fill with blend and opacity

- Fill direct (Flat or blended) do not have problem with offsets /bigger layers anymore.

- Transition filters can be enabled from the prefs (they look bad since we don’t support multiple input images for filters so far and are not meant to be used in this context).

- Square and 1-pixel non-smooth brushes now display a square cursor

New shortcuts:

- Shift - B - switches brush from ‘pixel’ to smooth mode
- Shift + Q switches between display modes for QuickMask (overlay or black and white)
- Shift + A switches between display modes for LayerMask/Filtermap
- Command + H - Shows/Hides selection contour

And all the small fixes that all of the above implies. Just use the update feature directly from the app and play with this shiny new release!

Did you say ColorSpace? 0

Hm, I just found the answer to the question in the previous post. There was an inconsistency in the ColorSpaces used.

Now I have just set these options to all my CIContexts and the colors are fine:

CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
contextOptions = [NSMutableDictionary dictionaryWithObjectsAndKeys:(id)colorSpace, kCIContextWorkingColorSpace, (id)colorSpace, kCIContextOutputColorSpace,nil];

Yes this means that your projects won’t look exactly the same in the next reelase but the value will be correct.

Thanks to George Orthwein for having posted this:
Explanation

BlendwithMask and a 50% gray image 1

Now that is something I just dont understand. I built a small QuartzComposer composition to verify it and it is indeed true.

- You have a black picture (0,0,0)
- You have a white picture (255,255,255)
- You have a gray picture (127,127,127)

Now if I use a CIBlendWithMask filter this way:

- black as inputBackgroundImage
- white as inputImage
- gray as inputMask

The result is as expected (exact same gray as the mask, which is at 50%).

But if I invert input and set the white as background and the white as input the result is completely diffent. I get a (much lighter gray, as you can see in the screenshot) .

You can get the test Quartz Compo here.

Release Alpha 37, quick fix for bindings 0

It seems I had something pretty wrong with the bindings in the Inspector window. They caused the app to crash when switching to full screen and dumped some nasty warning when closing the application. This release just fixes that.

In addition the following fixes were made:
- Command+T - setups a perspective transform filter (temporary solution)
- Perspective transform uses layer size (handles on a small layers are on limits of itself, not on limits of document)
- Fixed some tooltips errors (merci jeedee)

Now over 1 mb :-( 0

Looks like I can no longer boast about download sizes below 1 mb :-(

The size of the application’s zip is now 1.2 mb (3.2 mb uncompressed). The zip was 0.76 mb in the previous release. The reason? Actually updating Sparkle from the previous version to the current one increased it quite a bit. Ah the joy of multiple translations. They do take quite a bit of space for some reason (duplicating interface elements, not only plain text). I wonder what will be the size of ChocoFlop once translated in 25 languages…

PS: No, it’s by far not ready for translation by now.

Release Alpha 36, more HDR support and various stuff 0

Ladies, gentlemen and other insignificant species, please welcome the new release. Quite a long changelog this time, although many of the changes are under the hood. We now have correct handling of bitmap data in 128 bits modes (previously some operations used a 32 bits image). This is necessary before I can write a good magic wand.

Here is a summary of the changes (see changelog in mantis for complete list).

- Feature: Inspector window with color components in float, percent, decimal, and hexadecimal. Also show X,Y and W,H of selection.
- Feature: create selection from: active layer, layermask, filtermap, mixed full document
- Feature: add new layer with copy of filtermap
- Feature: convert whole document to/from 32,64,128 bits/pixel modes.
- Feature: alt+backspace can fill immediately
- Feature: Hold shift to constrain X / Y painting, moving handles
- Feature: Display Grid (with independent width and height)
- Feature: Snap to grid: (select tools, painting, moving handles)
- Feature: Grid can have Zero on any corner of document (prefs)
- Feature: Picker can pick transparency (set opactiy slider for active tool to picked valued)

- Quickmask button updates on document change, related buttons grayed if disabled.
- Working selection bitmap ( for pixel scanning operations) now support 32,128 bits modes (previously only 32 bits)
- ScanMask bounds and find visible limits now work in 128 bits pixels (if needed)
- Enabled progress when saving, pasting
- Select all now correctly shows that all is selected (rectangle around all image, instead of nothing)
- Grad distance for handles is now correct (only inside the visible handles, either big or small)
- Image resize: previewed memory usage now is corect with 64/128bits modes.
- New precise cursor for moving (not same as toolbar icon)
- Color picker does not pick background checkers anymore (when picking all layers)
- Color picker should only pick active layer if mode is some mask (quickmask, layermask, filtermap)
- You can now drag view and zoom while previewing a filter
- Cursor should get restored (several issues with this)
- Color picker can now pick float results (previously ony 8 bits per components was used)
- No more smoothing around rectangle selection (values not rounded gave blurry rectangles)
- Output / Preview of filters on masks are forced to grayscale
- Painting, gradients on masks are forced to grayscale (only green is used, so painting with blue looked black before)
- Pasting on masks forces grayscale
- Clear selection in qucikmask mode does not use selection to clear selection itself.
- OpenEXR saving is enabled again, with a HUGE warning (still destroy the image on intel machines)
- Updated to latest version of Sparkle (auto-update engine)

10.4.6 lock up bug gone in 10.4.7 0

On the good news side of thing it seems that the lock up bug that appeared in 10.4.6 seems to have dissappeared in 10.4.7. At least the CIMicroPaint sample code does not lockup as it did before. I think this will allow me to skip some steps in my own drawing code.