Re: [MBS] ZipMBS and Zip64 support?

2020-02-18 Thread Michael Diehr
To revive a very old thread...

Catalina apparently does things differently and no longer is happy with these 
ZipMBS files unless you do some more tweaks.

The solution is to properly set the "created by" version number field to :

dim zipVersionMadeBy as uint16 =  // 03 = unix. 14 hex = 20 decimal  =  
version 2.0
z.CreateFile(relativePath+name,zi,"","", zipFileComment, z.MethodDeflated, 
z.CompressionBestCompression, bUseZip64,bRaw, zipWindowBits, zipMemLevel, 
zipStrategy, zipPassword, zipCRC, zipVersionMadeBy, zipFlagBase)

Perhaps this hint can go in the MBS documentation?

See discussion here:  
https://forum.xojo.com/58553-catalina-unzip-file-permissions-problems/p1#p475852



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Feature Request: WKWebViewConfiguration

2019-03-31 Thread Michael Diehr
It would be handy if we could set options in WKWebViewConfiguration for the 
WKWebView control.

See https://developer.apple.com/documentation/webkit/wkwebviewconfiguration
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Crash in MBS_MacCF_CF_Plugin_19832

2019-01-22 Thread Michael Diehr
No, it was PR6, I'll try 19.0 release version and let you know.

> On Jan 20, 2019, at 10:03 AM, Christian Schmitz 
>  wrote:
> 
> 
> 
>> Am 20.01.2019 um 17:57 schrieb Michael Diehr :
>> 
>> Hi Christian, 
>> 
>> I'm seeing crashes in the following code:
>> 
> 
> Is that 19.0pr9?
> 
> Because I fixed something a few weeks ago which I broke a few weeks before 
> that.
> 
> 
> Sincerely
> Christian
> 
> -- 
> Read our blog about news on our plugins:
> 
> http://www.mbsplugins.de/
> 
> 
> ___
> Mbsplugins_monkeybreadsoftware.info mailing list
> mbsplugins@monkeybreadsoftware.info
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
> 

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Crash in MBS_MacCF_CF_Plugin_19832

2019-01-20 Thread Michael Diehr
I'm able to prevent the crash by adding extra Retain/Release calls as shown 
below, but am I just causing a memory leak?


Private Function BinaryPlistToDictionary(data as String) as Dictionary
  #if TargetMacOS

LogTrace CurrentMethodName + " length=" + str(data.lenB)
if data = "" then
  return nil
end if

dim cb as new CFBinaryDataMBS(data)
if cb = nil then
  return nil
end if
cb.RetainObject

dim co as CFObjectMBS = NewCFObjectMBSFromXML(cb)
if co = nil then
  return nil
end if
co.RetainObject

dim cd as CFDictionaryMBS = CFDictionaryMBS(co)
if cd = nil then
  return nil
end if
cd.RetainObject


dim d as dictionary = cd.Dictionary

cd.ReleaseObject
co.ReleaseObject
cb.ReleaseObject

cd=nil
co=nil
cb=nil

return d
  #endif
End Function


> On Jan 20, 2019, at 8:57 AM, Michael Diehr  wrote:
> 
> Hi Christian, 
> 
> I'm seeing crashes in the following code:
> 
> Private Function BinaryPlistToDictionary(data as String) as Dictionary
>  #if TargetMacOS
> 
>if data = "" then
>  return nil
>end if
>dim cb as CFBinaryDataMBS = NewCFBinaryDataMBSStr(data)
>if cb = nil then
>  return nil
>end if
> 
>dim co as CFObjectMBS = NewCFObjectMBSFromXML(cb)
>if co = nil then
>  return nil
>end if
> 
> 
>dim cd as CFDictionaryMBS = CFDictionaryMBS(co)
>if cd = nil then
>  return nil
>end if
> 
>dim d as dictionary = cd.Dictionary
>return d
>  #endif
> End Function
> 
> The crash log looks like this:
> 
> Thread 15 Crashed:
> 0   com.apple.CoreFoundation  0x7fff86ae4792 _CFRelease + 1346
> 1   MBS_MacCF_CF_Plugin_19832.dylib   0x00010efcfb5d 
> CFObjectDestructor(REALobjectStruct*) + 29
> 2   iScreensaver Designer 6.debug 0x00010a204bf6 
> CFObjectMBS.__exit%%o + 54
> 3   XojoFramework 0x00010c6273af RuntimeUnlockObject 
> + 815
> 4   iScreensaver Designer 6.debug 0x00010b7aad87 
> ciPhoto3.BinaryPlistToDictionary%o%os + 1335 
> (/ciPhoto3:11)
> 
> Is this my fault, or is there perhaps a double-free going on?
> ___
> Mbsplugins_monkeybreadsoftware.info mailing list
> mbsplugins@monkeybreadsoftware.info
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
> 

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Crash in MBS_MacCF_CF_Plugin_19832

2019-01-20 Thread Michael Diehr
Hi Christian, 

I'm seeing crashes in the following code:

Private Function BinaryPlistToDictionary(data as String) as Dictionary
  #if TargetMacOS

if data = "" then
  return nil
end if
dim cb as CFBinaryDataMBS = NewCFBinaryDataMBSStr(data)
if cb = nil then
  return nil
end if

dim co as CFObjectMBS = NewCFObjectMBSFromXML(cb)
if co = nil then
  return nil
end if


dim cd as CFDictionaryMBS = CFDictionaryMBS(co)
if cd = nil then
  return nil
end if

dim d as dictionary = cd.Dictionary
return d
  #endif
End Function

The crash log looks like this:

Thread 15 Crashed:
0   com.apple.CoreFoundation0x7fff86ae4792 _CFRelease + 1346
1   MBS_MacCF_CF_Plugin_19832.dylib 0x00010efcfb5d 
CFObjectDestructor(REALobjectStruct*) + 29
2   iScreensaver Designer 6.debug   0x00010a204bf6 
CFObjectMBS.__exit%%o + 54
3   XojoFramework   0x00010c6273af RuntimeUnlockObject 
+ 815
4   iScreensaver Designer 6.debug   0x00010b7aad87 
ciPhoto3.BinaryPlistToDictionary%o%os + 1335 
(/ciPhoto3:11)

Is this my fault, or is there perhaps a double-free going on?
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] WKWebview titleChanged event

2018-12-30 Thread Michael Diehr
> I added two new events:
> 
> TitleChanged(Title as String, oldTitle as string)
> EstimatedProgressChanged(estimatedProgress as double, oldEstimatedProgress as 
> double)

Thanks, I'm testing them now in PR5 and seem to work fine so far :-)
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] IconFamilyMBS Replacement

2018-12-30 Thread Michael Diehr
Nevermind, it looks like I already wrote code to do this back before I started 
using MBS :-)

> On Dec 30, 2018, at 2:57 PM, Michael Diehr  wrote:
> 
> I see from 
> https://www.mbs-plugins.de/archive/2018-11-04/IconFamilyMBS_class_deprecated/monkeybreadsoftware_blog_xojo
>  that IconFamilyMBS has been deprecated.
> 
> I've been using the code to create actual icon files in the ICNS format that 
> includes multiple sizes like this:
> 
> Public Function ConvertToICNSData(p as Picture) as MemoryBlock
>  dim fam as IconFamilyMBS  = NewIconFamilyMBS
> 
>  // downconvert to various sizes
>  dim sizes() as integer = array(1024,512,256,128, 48,32,16)
> 
>  for each size as integer in sizes
>if p.Width >= size or p.height >= size then
>  system.debuglog " adding icon size " + str(size) +"x" + str(size)
> 
>  dim pX as Picture = new Picture(size,size,32)
>  
> pX.graphics.drawPicture(p,0,0,pX.width,pX.height,0,0,p.width,p.height)
>  
> pX.Mask.graphics.DrawPicture(p.CopyMask,0,0,pX.width,pX.height,0,0,p.width,p.height)
>  call fam.SetIconImage(pX,pX.mask)
>end if
>  next
>  return fam.data
> End Function
> 
> Is there any way to do this now that IconFamilyMBS is gone?
> 
> 
> ___
> Mbsplugins_monkeybreadsoftware.info mailing list
> mbsplugins@monkeybreadsoftware.info
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
> 

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] IconFamilyMBS Replacement

2018-12-30 Thread Michael Diehr
I see from 
https://www.mbs-plugins.de/archive/2018-11-04/IconFamilyMBS_class_deprecated/monkeybreadsoftware_blog_xojo
 that IconFamilyMBS has been deprecated.

I've been using the code to create actual icon files in the ICNS format that 
includes multiple sizes like this:

Public Function ConvertToICNSData(p as Picture) as MemoryBlock
  dim fam as IconFamilyMBS  = NewIconFamilyMBS
  
  // downconvert to various sizes
  dim sizes() as integer = array(1024,512,256,128, 48,32,16)
  
  for each size as integer in sizes
if p.Width >= size or p.height >= size then
  system.debuglog " adding icon size " + str(size) +"x" + str(size)
  
  dim pX as Picture = new Picture(size,size,32)
  pX.graphics.drawPicture(p,0,0,pX.width,pX.height,0,0,p.width,p.height)
  
pX.Mask.graphics.DrawPicture(p.CopyMask,0,0,pX.width,pX.height,0,0,p.width,p.height)
  call fam.SetIconImage(pX,pX.mask)
end if
  next
  return fam.data
End Function

Is there any way to do this now that IconFamilyMBS is gone?


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] WKWebview titleChanged event

2018-12-21 Thread Michael Diehr
I'm trying to subclass the WKWebViewControlMBS 
https://www.monkeybreadsoftware.net/control-wkwebviewcontrolmbs.shtml 
to make it a drop-in replacement for the Xojo HTMLViewer.

One thing missing is the TitleChanged event.

For the long term, please consider this a feature request, but for the short 
term, I'm wondering if it can be accomplished with declares?

For example, the following Swift4 code will add an observer to a WKWebview's 
title property:

// add an observer for the .title property
webView.addObserver(self, forKeyPath: #keyPath(WKWebView.title), 
options:[.new], context:nil )
 

override func observeValue(forKeyPath keyPath: String?, of object: Any?, 
change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
if keyPath == "title" {
webView.titleChanged()
}
}


Can we do something similar in pure Xojo and/or using existing MBS functions?


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Improvements for new Picture object types

2018-04-18 Thread Michael Diehr
Can you explain the difference between 

 PictureMBS.CopyPictureWithMask
and
 PictureMBS.CopyPictureWithAlpha (new in 18.0)

It sounds like WithMask gives you 32 bit RGBA data (e.g. the "new style" xojo 
picture)?

And WithAlpha gives you the old style 24bit RGB Picture + separate Mask picture?

Or do I have that backwards?




> On Apr 18, 2018, at 8:51 AM, Christian Schmitz 
> <supp...@monkeybreadsoftware.de> wrote:
> 
> 
>> Am 18.04.2018 um 17:35 schrieb Michael Diehr <m...@xochi.com>:
>> 
>> Hi Christian,
>> 
>> In particular, Pictures now come in five flavors:
> 
> Well, actually we handle 10 different kinds as per platform the types differ.
> 
>> * Old style (32 bit picture + separate mask) - these are still used by the 
>> framework in some places.
> 
> And are still my preferred type as a lot of changes need un-multiply which is 
> difficult and slow.
> 
>> * MutableBitmap (32 bit RGBA picture - no separate mask)
> 
> Most functions still ignore alpha.
> 
>> * ImmutableBitmap (available with SupportHiDPI is ON).
>> * Vector
> 
> 
> For both, for reading, we make a clone first to get a bitmap.
> 
>> * Image Sets (which contain multiple Pictures)
> 
> We pick highest resolution bitmap for reading.
> 
> 
> 
> Sincerely
> Christian
> 
> -- 
> Read our blog about news on our plugins:
> 
> http://www.mbsplugins.de/
> 
> 
> ___
> Mbsplugins_monkeybreadsoftware.info mailing list
> mbsplugins@monkeybreadsoftware.info
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Improvements for new Picture object types

2018-04-18 Thread Michael Diehr
Hi Christian,

This is a general feature request.   

Xojo now has a complicated variety of image objects as described here:  

http://developer.xojo.com/hidpi-support

In particular, Pictures now come in five flavors:

  * Old style (32 bit picture + separate mask) - these are still used by the 
framework in some places.
  * MutableBitmap (32 bit RGBA picture - no separate mask)
  * ImmutableBitmap (available with SupportHiDPI is ON).
  * Vector
  * Image Sets (which contain multiple Pictures)

It would be nice if MBS Plugins had updates to reflect the new complexity:
  * Documentation changes to clarify which type(s) are supported
  * Increased support for the newer types 
for example, the PictureMBS.Constructor(picture,useAlpha) could support the 
ImmutableBitmap type
  * Deprecation for the older types as needed
  * etc.

Thanks!

Mike
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Check if ImmutableBitmap has alpha channel

2018-04-17 Thread Michael Diehr
With Supports HiDPI ON, Xojo loads pictures as ImmutableBitmaps, which always 
claim hasAlphaChannel=True regardless of the source file.

See here:  
https://forum.xojo.com/47184-picture-fromdata-gives-immutablebitmap-with-hasalphachannel-tru/last

Apparently this is stored internally as an NSImage, and once it's an NSImage 
there is no way to tell if the original file did or did not have alpha.

A brute-force workaround: get the copy of the mask, and see if all the pixels 
are zero.

Is there a fast way to do that in MBS?

Looks like PictureMBS.CompareImages might work, although I'd rather have a 
function that was fast and exited upon finding the first different pixel.

Ideas?
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] ProcessMBS get command line parameters?

2017-09-17 Thread Michael Diehr
> On Sep 17, 2017, at 8:43 AM, Christian Schmitz 
> <supp...@monkeybreadsoftware.de> wrote:
> 
> 
>> Am 17.09.2017 um 15:45 schrieb Michael Diehr <m...@xochi.com>:
>> 
>> On macOS, using "ps -x -o pid,command" I can get a list of other running 
>> processes along with their command line parameters / flags.
>> 
>> Is there a way to do this using MBS?
> 
> No. And I would consider it a security problem.

Ok.  I'm not sure I agree about it being a security problem (since the same 
info is available by running a shell) but maybe in a sandboxed app it would be. 
I'll just use the "ps -x" command.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] ProcessMBS get command line parameters?

2017-09-17 Thread Michael Diehr
On macOS, using "ps -x -o pid,command" I can get a list of other running 
processes along with their command line parameters / flags.

Is there a way to do this using MBS?

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] PIctureMBS.CopyPictureWithoutMaskMBS

2017-06-29 Thread Michael Diehr
I recently upgraded from 15.4 to 17.2 and noticed that these functions:
  PictureMBS.CopyPictureWithMaskMBS
  PictureMBS.CopyPictureWithoutMaskMBS

are now throwing exceptions when using normal (32 bit) Xojo picture objects:

Unhandled Exception: 0 Masks for Pictures with alpha channel is not supported 
in XojoFramework.dylib$9150

The workaround is pretty simple:

Function CopyPictureWithoutMask(extends pic as Picture) As Picture
  // This replaces the function in MBS 17.2
  // return a picture containing only the RGB channels, ignoring the Alpha
  if pic=nil then
return nil
  end if
  dim pm as new PictureMBS(pic,false)
  return pm.CopyPicture
End Function

I think it would make sense for these two functions to work with new 32 bit 
Xojo pictures, no?

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Win32 equivalent to AVAssetMBS.duration

2017-05-25 Thread Michael Diehr
I'm trying to get the play time (duration in seconds) of A/V assets such as 
.mp3 and .mp4 files.

On Mac I just use AVAssetMBS.duration

Is there an easy-to-use equivalent for Win32 builds?

Thanks!

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] [ANN] MonkeyBread Software Releases the MBS Xojo / Real Studio plug-ins in version 16.5

2017-01-02 Thread Michael Diehr
Hi Christian, 

When attempting to download via the Mirror (using 
http://www.mbsdownload.com/plugin/MBS-Xojo-Plugins165.dmg ) I get a zero byte 
file.  The main download (using 
https://www.monkeybreadsoftware.de/xojo/download/plugin/MBS-Xojo-Plugins165.dmg 
) works fine.

This is via https://www.monkeybreadsoftware.de/xojo/plugins.shtml


> On Dec 12, 2016, at 4:13 AM, Christian Schmitz 
>  wrote:
> 
> NICKENICH, Germany (December 12th, 2016) -- Monkeybread Software releases
> version 16.5 of the MBS plug-in for Xojo and Real Studio.
> 
> The MBS plug-in comprises a collection of several plug-in parts which extend
> the Xojo (Real Studio) development environment with 2,400 classes featuring
> over 61,000 documented functions. Our plugins support all three platforms Mac
> OS X, Windows and Linux with all project types desktop, web and console
> including 64-bit and ARM targets.
> 
> 
> Some of the highlights on the 16.5 update:
> 
> 
> If you do math and you need more precision than a double or currency data type
> can offer, you may want to check our new BigNumberMBS class. This is a 320bit
> floating point number, but it can also be used as a 256bit integer. Precision
> is excellent with over 100 digits before the dot.
> 
> For macOS 10.12 we added several TouchBar classes. You can offer normal
> buttons, but also advanced controls like sliders, popovers or groups. The
> plugin provides functions to check if TouchBar is available and events so you
> know whether your items are visible.
> 
> For DynaPDF we added new StyledText functions. You can convert from a Xojo
> StyledText to the formatting commands used by DynaPDF. And you can pass
> StyledText directly to our WriteStyledText method to draw on a PDF page.
> 
> For editing Excel documents with our XL Plugin, we provide now more methods
> and new copy functions. You can copy sheets from one book to another, or the
> content from one sheet to another, even across books. If needed you can also
> copy single rows from one document to another. And in case LibXL updates
> quicker than our plugin, you can now optionally load the LibXL libraries
> directly from disk.
> 
> If you use Xojo 2016r4 or newer, please update to this release. This plugin is
> built using the latest SDK, but with backwards compatibility down to REALbasic
> 2006r4. For Windows we added support for DirectDraw pictures. Older plugins
> may not work correctly in Xojo 2016r4.
> 
> Our barcode generator learnt two new types: DotCode and HanXin, we added
> tabbing features to NSWindowMBS, XFA stream support in DynaPDF and time code
> reading for AVAsset.
> 
> We updated CURL library to version 7.51.0, DynaPDF to 4.0.5.15, libSSH2 to
> 1.8, libXL to 3.7.0, OpenSSL to 1.0.2j, PortAudio, SQLAPI++ to 4.1.10, SQLite
> to 3.15.0 and zint to 2.5. 
> 
> 
> See release notes for a complete list of changes:
> http://www.monkeybreadsoftware.com/xojo/newinversion165.shtml
> 
> 
> If you have questions, please don't hesitate to contact us.
> 
> 
> The plug-ins require Xojo or Real Studio 2006r4 or newer. Also required are 
> 1 GB hard disc space and around 1 GB of RAM in addition to the requirements of
> Xojo (Real Studio) and your operation system itself. While all plug-in parts
> compile on Mac OS X, Linux and Windows, each function may depend on additional
> system requirements to work successfully.
> 
> Plugin licenses are available for components or for the complete collection.
> Starting at 20 Euro ($29 USD) for one component. The complete package costs
> 199 Euro ($299 USD) for commercial usage. If you buy a current license, you
> will get free updates for one year. After one year, you can update your
> license to cover an additional year.
> 
> 
> The plugins can be downloaded on MBS' website as one big package or
> several smaller ones:
> http://www.monkeybreadsoftware.com/xojo/plugins.shtml
> 
> The online documentation can be found here:
> http://www.monkeybreadsoftware.net/
> 
> Read the complete release notes here:
> http://www.monkeybreadsoftware.com/xojo/ReleaseNotes.shtml
> 
> For questions and announcements you may subscribe to our email list at
> http://www.monkeybreadsoftware.com/xojo/mailinglist.shtml or visit
> the list archive at http://www.monkeybreadsoftware.com/listarchive/
> 
> 
> Meet us in Berlin at the MBS Xojo Developer Conference in May 2017
> http://monkeybreadsoftware.de/conference
> 
> 
> 
> 
> 
> Located in beautiful Nickenich, Germany, MonkeyBread Software is a
> privately held company founded in 2000 by Christian Schmitz. MonkeyBread
> Software focuses on the Macintosh, Linux and Windows platforms. With over
> fifteen years as a software developer, Christian's aim is developing
> unique and useful utilities, complemented by first-class customer
> support. 
> 
> Copyright 2000-2016 Christian Schmitz Software GmbH.
> MonkeyBread Software is a registered trademark of Christian Schmitz,
> Nickenich. All Rights Reserved. Apple, and the 

[MBS] ZipFileInfoMBS and Dates

2016-01-31 Thread Michael Diehr
Hi Christian,

I'm getting some weird results where the Month and Day both seem to be off by 
one and I'm wondering if the documentation is wrong or I'm doing something 
wrong?

Here's my code:
  
  dim zi as new ZipFileInfoMBS
  dim d as date = f.ModificationDate
  zi.day = d.day
  zi.month = d.month
  zi.year = d.year
  zi.hour = d.hour
  zi.minute = d.minute
  zi.second = d.second

The documentation for ZipFileInfo says that Month, Hour, Minute, and Second are 
all zero-based, but that Day is 1-based [1..31].


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] ZipFileInfoMBS and Dates

2016-01-31 Thread Michael Diehr
Ok, I see from your example that you do need to subtract one from the Month, or 
just use the  .SetDate(date) method which looks even easier. 
Problem solved.




'info.Day=d.day
'info.Month=d.Month-1
'info.Year=d.Year
'info.Minute=d.Minute
'info.hour=d.hour
'info.Second=d.Second

 info.SetDate d



> On Jan 31, 2016, at 4:53 PM, Michael Diehr <m...@xochi.com> wrote:
> 
> Hi Christian,
> 
> I'm getting some weird results where the Month and Day both seem to be off by 
> one and I'm wondering if the documentation is wrong or I'm doing something 
> wrong?
> 
> Here's my code:
> 
>  dim zi as new ZipFileInfoMBS
>  dim d as date = f.ModificationDate
>  zi.day = d.day
>  zi.month = d.month
>  zi.year = d.year
>  zi.hour = d.hour
>  zi.minute = d.minute
>  zi.second = d.second
> 
> The documentation for ZipFileInfo says that Month, Hour, Minute, and Second 
> are all zero-based, but that Day is 1-based [1..31].
> 
> 
> ___
> Mbsplugins_monkeybreadsoftware.info mailing list
> mbsplugins@monkeybreadsoftware.info
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] PictureMBS and Premultiplied alpha?

2016-01-19 Thread Michael Diehr
Hi Christian,

It appears that

  PictureMBS.RowInFormat(y,ImageFormatRGBA)

is returning premultiplied RGBA data, even on Win32 which doesn't use 
Premultiplied alpha.

Here's a little test:

  #if TargetWin32
app.UseGDIPlus = true
  #endif
  
  dim p as new picture(128,128)   // new-style 32 bit xojo picture
  
  dim c as color =   // Red = 255, Green = 0, Blue = 0, Alpha = 128
  
  p.Graphics.ForeColor = c
  p.Graphics.FillRect 0,0,p.width,p.height
  
  dim rgba as color = p.RGBSurface.Pixel(0,0)
  MsgBox "Pixel RGBA = " + str(rgba.Red) + " " + str(rgba.Green) + "  " + 
str(rgba.blue) + " " + str(rgba.Alpha)
  
  // now make a pictureMBS and get the data
  
  dim pm as new PictureMBS(p, p.HasAlphaChannel)
  
  dim mb as MemoryBlock = pm.RowInFormat(0,PictureMBS.ImageFormatRGBA)
  
  MsgBox "Data RGBA = " + str(mb.byte(0)) + " " + str(mb.byte(1)) + "  " + 
str(mb.byte(2)) + " " + str(mb.byte(3))
  
  
On both Mac and Windows, I get

  Pixel RGBA = 255, 0, 0, 127
  Data  RGBA = 127, 0, 0, 127

I would expect to get

  Data  RGBA = 255, 0, 0, 127

on both platforms, although I suppose you could argue that on Mac perhaps the 
premultiplied values are "right".

Is there any way I can work around this and get the raw RGBA data, not 
premultiplied?


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] PictureMBS and Premultiplied alpha?

2016-01-19 Thread Michael Diehr
On Jan 19, 2016, at 2:06 PM, Christian Schmitz <supp...@monkeybreadsoftware.de> 
wrote:
> 
> 
>> Am 19.01.2016 um 21:48 schrieb Michael Diehr <m...@xochi.com>:
>> 
>> Hi Christian,
>> 
>> It appears that
>> 
>> PictureMBS.RowInFormat(y,ImageFormatRGBA)
>> 
>> is returning premultiplied RGBA data, even on Win32 which doesn't use 
>> Premultiplied alpha.
> 
> The plugin returns whatever pixel values are there.
> 
> So we don't premultiply for you and we don't reverse it.

Interesting : I wonder then if Xojo documentation is wrong, and that they are 
storing pictures premultiplied on Win32, and then RGBSurface.Pixel() must be 
un-premultiplying it when invoked?


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] ScreenshotRectMBS and HighDPI Windows Apps

2016-01-12 Thread Michael Diehr
I'm finding that in Windows 10, the call

dim p as picture =  
ScreenshotRectMBS(self.left,self.top,self.width,self.height) 

is returning the wrong area of the screen, when running on a display that is 
not set at 100% scale factor.

My guess is that your call is using physical pixels rather than logical pixels?

The fix should be just to ask Windows what the scaling factor is and then 
adjust the coordinates.

Easy, right?

Not so- many of the APIs lie to you about the dpi scaling.

For example

Dim dpiX As Integer = GetDeviceCaps(hdc, LOGPIXELSX)

Always returns 96


I found one answer that seems to work:

// see 
http://stackoverflow.com/questions/5977445/how-to-get-windows-display-settings 

Declare Function GetDC Lib "user32" (hWnd As Integer) As Ptr
Declare Function GetDeviceCaps Lib "gdi32" (hdc As Ptr, nIndex As Integer) 
As Integer
Declare Sub ReleaseDC Lib "user32" (hWnd As Integer, hdc As Ptr)

const VERTRES = 10
const DESKTOPVERTRES = 117

Dim hdc As Ptr = GetDC(self.Handle)
Dim logicalHeight As Integer = GetDeviceCaps(hdc, VERTRES)
Dim physicalHeight As Integer = GetDeviceCaps(hdc, DESKTOPVERTRES)
ReleaseDC(hwnd, hdc)

Dim scaleFactor As Double = physicalHeight/logicalHeight

dim p as picture = ScreenshotRectMBS(self.left* scaleFactor,self.top* 
scaleFactor,self.width* scaleFactor,self.height* scaleFactor)  

// the picture may be an odd size, so resize the picture if needed



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Picture.RotateMBS bug on Win32

2015-10-31 Thread Michael Diehr
FYI, when using RotateMBS on Win32 with a 32 bit image source, although the 
image itself rotates fine, the image mask may have junk in the image channel. 

The mask junk is not, fortunately in the mask's alpha channel so the fix is 
therefore just to draw the mask to a temporary picture after rotating, which 
removes the junk:

// assume p0 is a 32 bit image with alpha
dim tmp as picture = p0
dim tmpMask as picture = p0.CopyMask
tmp = tmp.RotateMBS(angle, backColor)
dim backMaskColor as color = 
tmpMask = tmpMask.RotateMBS(angle, backMaskColor)   // on win32 there 
is junk in the RGB channel
  
  #if TargetWin32
// fix for win32 bugs
dim t2 as picture = new picture(tmpMask.Width,tmpMask.Height)
t2.Graphics.ForeColor = backMaskColor
t2.Graphics.FillRect 0,0,t2.width, t2.height
t2.graphics.drawPicture tmpMask,0,0
tmpMask = t2
  #endif

// recombine picture and mask
dim dest as new picture(tmp.width,tmp.height)
dest.FillPicture() // clean it out
dest.FillPicture(backColor) 
dest.Graphics.DrawPicture tmp,0,0
dest.ApplyMask tmpMask

Perhaps this could be fixed in MBS plugins, or at least added as a note to 
documentation?  
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] HTMLViewer.IELoadHTMLMBS

2015-10-20 Thread Michael Diehr
On Oct 20, 2015, at 3:35 AM, Christian Schmitz <supp...@monkeybreadsoftware.de> 
wrote:
> 
> 
>> Am 20.10.2015 um 04:30 schrieb Michael Diehr <m...@xochi.com>:
>> 
>> I'm not having any luck with HTMLViewer.IELoadHTMLMBS, testing under Windows 
>> 10 it always returns false.  
>> 
>> The documentation is a little unclear, saying "On Windows you may need to 
>> reset webviewer before or load "about:blank" to initialize the webviewer by 
>> Xojo (or Real Studio)."
> 
> first call this:
>  HTMLViewer1.LoadURL "about:blank"
> 
> than you can call this:
> 
>  if HTMLViewer1.IELoadHTMLMBS(TextArea1.Text) then
>// ok
>  else
>MsgBox "Failed to load html."
>  end if

My problem was trying to do both calls in the same event, it appears that you 
need to do the LoadURL call first, then do the second call later.  Otherwise it 
fails.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] HTMLViewer.IELoadHTMLMBS

2015-10-19 Thread Michael Diehr
I'm not having any luck with HTMLViewer.IELoadHTMLMBS, testing under Windows 10 
it always returns false.  

The documentation is a little unclear, saying "On Windows you may need to reset 
webviewer before or load "about:blank" to initialize the webviewer by Xojo (or 
Real Studio)."

Do you have sample code?
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Lossy Image Compression with Alpha (JPEG2000, BPG or WebP)

2015-10-16 Thread Michael Diehr
I'm looking for the ability to have good compression levels (lossy) with alpha 
channel.  

I believe the options are:

JPEG2000
BPG http://bellard.org/bpg/
WebP https://developers.google.com/speed/webp/?hl=en

Christian, any interest in adding one or more of these to MBS?   I believe that 
BPG is supposed to be open source (but is still in beta).  WebP is also 
open/free (I think)

Based on this demo, BPG looks really good to me:
http://xooyoozoo.github.io/yolo-octo-bugfixes/#mascot=s=s


Thanks

Mike
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] NSProcessInfoMBS constants

2015-10-08 Thread Michael Diehr
I'm seeing some issues with the constants for NSprocessInfoMBS:

1.  constant is wrong type?

dim nspi as new NSProcessInfoMBS
dim options as uint64 = Bitwise.BitOr( 
NSProcessInfoMBS.NSActivitySuddenTerminationDisabled, 
NSProcessInfoMBS.NSActivityLatencyCritical)

Gives a "parameters are not compatible with this function" error.


2. NSActivityAutomaticTerminationDisabled is not defined (but exists in 10.9:
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSProcessInfo_Class/#//apple_ref/c/tdef/NSActivityOptions


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] bitmapImageRepForCachingDisplayInRect

2015-10-08 Thread Michael Diehr
On Oct 7, 2015, at 3:31 PM, Christian Schmitz  
wrote:
> 
>> My question:  is there a way in MBSPlugins to do this and quickly convert 
>> back to a Xojo Picture object?   I've some sample code which gets the 
>> bitmapImageRep and then converts it to a BMP and then use 
>> Picture.FromData(), but this seems like it's probably a slow process.
> 
> pass the handle to this method:
> CGImageMBS.CreateImageWithHandle(handle as integer) as CGImageMBS

Nice, I can then call CGimageMBS.Picture() to get the Xojo picture object.  
Works great, thank you :)
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] bitmapImageRepForCachingDisplayInRect

2015-10-07 Thread Michael Diehr
Christian, there's example code floating around that uses 
bitmapImageRepForCachingDisplayInRect to get a "screenshot" of a NSView - and 
it seems like it's more likely to pick up content such as HTMLViewers.  (See 
https://forum.xojo.com/17847-yosemite-and-overlaymbs-fadetransition-can-t-capture-vibrancy/p1#p148223
 for example)

My question:  is there a way in MBSPlugins to do this and quickly convert back 
to a Xojo Picture object?   I've some sample code which gets the bitmapImageRep 
and then converts it to a BMP and then use Picture.FromData(), but this seems 
like it's probably a slow process.

Possibly related question: If I use declares and end up with a Ptr to a NSImage 
(but not a NSImageMBS) is there any way to cast the Ptr to a NSImageMBS so that 
I can then use MBS methods on it?


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] CPU use on OS X and Windows

2015-10-02 Thread Michael Diehr
On Sep 22, 2015, at 9:17 AM, Christian Schmitz <supp...@monkeybreadsoftware.de> 
wrote:
> 
> 
>> Am 22.09.2015 um 17:36 schrieb Michael Diehr <m...@xochi.com>:
>> 
>>> I think DarwinResourceUsageMBS is for your app.
>> 
>> Hmm - testing the "Darwin Resource Usage" sample project however, I get "0" 
>> for System Time used and UserTimeUsed, which doesn't seem very useful for 
>> calculating real-time CPU usage.   Correction, after a while UserTimeUsed 
>> rises to 1 and then 2, but it takes about a minute.  Should these perhaps be 
>> doubles rather than integers?
> 
> Yes. Let me fix.

Confirmed fixed in 15.3 release, thank you.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] CPU use on OS X and Windows

2015-09-22 Thread Michael Diehr
Related question: How do i get the CPU usage, for the current process only, on 
Cocoa and Win32.

I'd like to get the same value that shows up in Activity Monitor's CPU% column, 
and for windows Task Manager.  I'm only interested in the CPU usage for the 
currently running process.

For Cocoa, I see DarwinVMStatisticsMBS but I'm not clear if that's per-process 
or global?

For Win32, should I use WindowsProcessStatisticsMBS?  Is it per-process or 
global?

Thanks



> On Sep 21, 2015, at 6:44 PM, Michael Diehr <m...@xochi.com> wrote:
> 
> Perfect! thank you :-)
> 
>> On Sep 21, 2015, at 1:40 AM, Christian Schmitz 
>> <supp...@monkeybreadsoftware.de> wrote:
>> 
>> 
>>> Am 21.09.2015 um 02:39 schrieb Michael Diehr <m...@xochi.com>:
>>> 
>>> See this thread:  
>>> http://stackoverflow.com/questions/10110658/programmatically-get-gpu-percent-usage-in-os-x
>>> 
>>> Is there anything in MBS which can do this (read the GPU's cpu %, used and 
>>> free Vram numbers)?
>>> 
>> 
>> See the "GPU Performance Statistics" project included with Examples.
>> 
>> Sincerely
>> Christian
>> 
>> -- 
>> Read our blog about news on our plugins:
>> 
>> http://www.mbsplugins.de/
>> 
>> ___
>> Mbsplugins_monkeybreadsoftware.info mailing list
>> mbsplugins@monkeybreadsoftware.info
>> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
> 
> ___
> Mbsplugins_monkeybreadsoftware.info mailing list
> mbsplugins@monkeybreadsoftware.info
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] CPU use on OS X and Windows

2015-09-22 Thread Michael Diehr
> I think DarwinResourceUsageMBS is for your app.

Hmm - testing the "Darwin Resource Usage" sample project however, I get "0" for 
System Time used and UserTimeUsed, which doesn't seem very useful for 
calculating real-time CPU usage.   Correction, after a while UserTimeUsed rises 
to 1 and then 2, but it takes about a minute.  Should these perhaps be doubles 
rather than integers?
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] GPU use on OS X?

2015-09-21 Thread Michael Diehr
Perfect! thank you :-)

> On Sep 21, 2015, at 1:40 AM, Christian Schmitz 
> <supp...@monkeybreadsoftware.de> wrote:
> 
> 
>> Am 21.09.2015 um 02:39 schrieb Michael Diehr <m...@xochi.com>:
>> 
>> See this thread:  
>> http://stackoverflow.com/questions/10110658/programmatically-get-gpu-percent-usage-in-os-x
>> 
>> Is there anything in MBS which can do this (read the GPU's cpu %, used and 
>> free Vram numbers)?
>> 
> 
> See the "GPU Performance Statistics" project included with Examples.
> 
> Sincerely
> Christian
> 
> -- 
> Read our blog about news on our plugins:
> 
> http://www.mbsplugins.de/
> 
> ___
> Mbsplugins_monkeybreadsoftware.info mailing list
> mbsplugins@monkeybreadsoftware.info
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] GPU use on OS X?

2015-09-20 Thread Michael Diehr
See this thread:  
http://stackoverflow.com/questions/10110658/programmatically-get-gpu-percent-usage-in-os-x

Is there anything in MBS which can do this (read the GPU's cpu %, used and free 
Vram numbers)?

Thanks

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] OverlayMBS performance in Cocoa?

2015-09-10 Thread Michael Diehr
Hi Christian,

I'm doing some profiling of my code and noticing that OverlayMBS seems rather 
slow in some cases, e.g. .Update and (perhaps) changing the value of .Alpha.   
Sometimes a single OverlayMBS is taking 7-14 msec to update, which is causing 
stutters in other animations onscreen.

Some questions:

* There is a .Update(NSImage as variant) call - would that be faster than using 
the separate .Pict and .Mask objects?
* Is calling .Alpha slow?
* Any general tips for speeding it up?

Thx
Mike
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] OverlayMBS performance in Cocoa?

2015-09-10 Thread Michael Diehr
On Sep 10, 2015, at 1:09 PM, Christian Schmitz  
wrote:
> 
> * There is a .Update(NSImage as variant) call - would that be faster than 
> using the separate .Pict and .Mask objects?
> 
> yes. Plugin builds a new NSImage from those pictures.

I will try this.  Does .Update(NSImage) retain a reference to the NSImage, so I 
can just change the pixels myself?  Or does it internally make a copy?   

> 
>> * Is calling .Alpha slow?
> 
> No.
> 
>> * Any general tips for speeding it up?
> 
> First measure with Instruments where you spend all the time.

Will do - I've been using Xojo profiler mainly, but it has limited accuracy 
with plugins naturally...

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] OverlayMBS closed in thread : don't do it

2015-08-26 Thread Michael Diehr
Just ran into a baffling bug with OverlayMBS - turned out I was closing them 
inside a thread.  Although everything looked normal, this was causing many 
problems later on including an eventual crash.   It was extremely hard to debug 
this, as you can imagine.

Christian - I wonder if you could add some sanity checks inside your code and 
perhaps manually raise a ThreadAccessingUIException if this happens?   
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] ReadRow or Scanline for JPEG?

2015-08-20 Thread Michael Diehr
Hi Christian,

When using PictureMBS, there are examples for loading giant pictures using 
PNGReaderMBS.ReadRow, and TIFFPictureMBS.Scanline().

I looked at JPEGImporter but it doesn't seem to have a way to get row-by-row 
data.

Is there any equivalent technique for reading gigantic JPEG images?

thx
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] ReadRow or Scanline for JPEG?

2015-08-20 Thread Michael Diehr
On Aug 20, 2015, at 1:32 PM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:
 Yes. Read row by row.
 
 By using InitJPEG/LoopJPEG and FinishJPEG.
 And using a mode with ByRow in name. The memoryblock in PictureData has the 
 bytes for each row after calling LoopJPEG.

Brilliant, works great - thank you!
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] NSViewMBS.RenderImage delivers empty picture

2014-10-23 Thread Michael Diehr
On Oct 22, 2014, at 10:32 AM, Tim Jones tolis...@me.com wrote:

 On Oct 22, 2014, at 10:18 AM, Michael Diehr m...@xochi.com wrote:
 
 It's actually a HTML page that can include any number of videos that may be 
 overlaid in a complex web page, so I really need the RenderImage().
 The check if it returns in  5msec workaround seems OK for now.
 
 How are you dealing with the potential of network congestion?  Could there be 
 a caching issue that might cause that check to become invalid?

The content is local from the hard drive, so it's generally not an issue.

My hunch is that internally, the Cocoa WebView is preparing the next update to 
the movie(s) frame(s) and when it gets the render call, it simply returns a 
blank image?  Seems that it would make more sense to just deliver the last 
rendered image if nothing is available, but maybe it doesn't work that way.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] FileMapping.OpenSharedMemory failing on Win32 builds

2014-07-29 Thread Michael Diehr
Hi Christian,

I'm seeing FileMapping.OpenSharedMemory(id) failing on Win32 builds.  I'll send 
you a demo project off-list.

I'm wondering: are there any rules about the id string?  The docs mention 
that it's limited to 31 chars on OS X but don't say anything about a limitation 
on Win32...


-mike

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] JPEG2000...?

2014-07-26 Thread Michael Diehr
Which plugin is it part of?

On Jul 25, 2014, at 8:23 PM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 
 Am 25.07.2014 um 23:31 schrieb Michael Diehr m...@xochi.com:
 
 Hi Christian,
 
 Is there any way to do JPEG2000 export under Win32 in MBS (without using 
 QuickTime)?  Back in 2003 you were playing with the Jasper library but it 
 sounds like it was never finished.
 
 I think I added it in 13.5 or 14.1!?
 
 Sincerely
 Christian
 
 -- 
 Read our blog about news on our plugins:
 
 http://www.mbsplugins.de/
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] JPEG2000...?

2014-07-25 Thread Michael Diehr
Hi Christian,

To revive a very old thread... 

Is there any way to do JPEG2000 export under Win32 in MBS (without using 
QuickTime)?  Back in 2003 you were playing with the Jasper library but it 
sounds like it was never finished.


On Apr 25, 2003, at 11:05 AM, Christian Schmitz 
supp...@monkeybreadsoftware.de wrote:

 Christian-
 
 Any further luck with Jasper or another JPEG2000 library?
 
 I got it compiled, but I had no time to go further.
 
 Mfg
 Christian
 
 -- 
 Four thousand functions in one REALbasic plug-in. The MBS Plugin.
 
 http://www.monkeybreadsoftware.de/realbasic/plugins.html
 
 -- 
 Web8REALbasic mailing list
 web8realba...@monkeybreadsoftware.de
 http://mail.huynh.de/mailman/listinfo/web8realbasic

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] PictureMBS platform byte-order differences

2014-06-27 Thread Michael Diehr
Hi Christian,

If you run the following code on Cocoa vs. Win32 (with GDI+ enabled), the final 
picture result is different, it appears as if the pixels are mis-ordered:

Pushbutton1.Action
  ' testing PictureMBS byte order
  dim w,h as integer
  w=32
  h=32
  dim p as new picture(w,h)
  dim r as RGBSurface = p.RGBSurface
  for y as integer = 0 to h-1
for x as integer = 0 to w-1
  r.Pixel(x,y) = cFF80bb99
next
  next
  
  dim pSrc as new PictureMBS(p,p.HasAlphaChannel)
  dim data as new MemoryBlock(w*h*4)
  dim pDest as new PictureMBS(data,w,h,PictureMBS.ImageFormatBGRA,w*4)
  
  call pDest.copyPixels(pSrc)
  
  dim p2 as picture = pDest.CopyPicture
  break // look at p2 in the debugger.  On Mac it's purpleish, on windows it's 
greenish

Is this a bug in PictureMBS?

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] PictureMBS platform byte-order differences

2014-06-27 Thread Michael Diehr
It seems that a workaround is to add this:

  #if TargetWin32
data.EndianU32_LtoBMBS(0,data.size/4)
  #endif


On Jun 27, 2014, at 9:03 AM, Michael Diehr m...@xochi.com wrote:

 Hi Christian,
 
 If you run the following code on Cocoa vs. Win32 (with GDI+ enabled), the 
 final picture result is different, it appears as if the pixels are 
 mis-ordered:
 
 Pushbutton1.Action
  ' testing PictureMBS byte order
  dim w,h as integer
  w=32
  h=32
  dim p as new picture(w,h)
  dim r as RGBSurface = p.RGBSurface
  for y as integer = 0 to h-1
for x as integer = 0 to w-1
  r.Pixel(x,y) = cFF80bb99
next
  next
 
  dim pSrc as new PictureMBS(p,p.HasAlphaChannel)
  dim data as new MemoryBlock(w*h*4)
  dim pDest as new PictureMBS(data,w,h,PictureMBS.ImageFormatBGRA,w*4)
 
  call pDest.copyPixels(pSrc)
 
  dim p2 as picture = pDest.CopyPicture
  break // look at p2 in the debugger.  On Mac it's purpleish, on windows it's 
 greenish
 
 Is this a bug in PictureMBS?
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] SystemInformationMBS.MacVRAMSize

2014-06-26 Thread Michael Diehr
An update to this:  with 14.2 on 10.8.5 and a VRAM card size of 1024MB, 
SystemInformationMBS.MacVRAMSize is returning 268435456 which is 256MB.

Any ideas why the value is wrong?




On Nov 20, 2011, at 10:51 AM, Christian Schmitz 
supp...@monkeybreadsoftware.de wrote:

 
 Am 20.11.2011 um 17:28 schrieb Michael Diehr:
 
 Hi Christian... to follow up on an old thread.
 
 I have a user with a macbook pro with 2 graphics cards (NVIDIA 9600 and 
 NVIDIA 9400).  The 9600 has 512MB of VRAM, yet 
 SystemInformationMBS.MacVRAMSize is reporting 256MB.  (The user has verified 
 that the 9600 is, indeed, active at the time).
 
 Not a big deal, but might be nice to improve at some point.
 
 Well, we query the value we can get :-)
 
 Also, modern VRAM sizes are heading over 2GB, so this may need to return a 
 UINT64 soon :)
 
 
 No problem. I can change that today.
 
 Greetings
 Christian
 
 -- 
 See you in Orlando, Florida for Real World 2012
 
 More details and registration here:
 http://www.realsoftware.com/community/realworld.php
 
 
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] [ANN] 14.2pr12

2014-06-21 Thread Michael Diehr

On Jun 20, 2014, at 1:56 PM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 Hi,
 
 
 * Added HasAlphaChannel property for PictureEditorMBS, PictureReaderMBS and 
 PictureWriterMBS class.

Thanks!

 * Added NewPictureWriterMBS support for alpha images and for reusing images.

what does for reusing images mean? 

 * Fixed problem with GDI Plus bitmap in PictureMBS and other picture 
 functions.

Can you say more about what issue(s) this fixes?
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] FileMapping : Detach memoryblock?

2014-06-20 Thread Michael Diehr
I'm experimenting with FileMappingMBS.  Is there a way to detach the memory 
block received and then destroy the FileMappingView, without losing the memory 
block?  I'm trying to avoid an extra MemoryBlock copy if possible.


Server:
  dim fm as new FileMappingMBS
  fm.CreateSharedMemory(idxxx,size)  
  dim fmv as FileMappingViewMBS = fm.MapView(0,size)
  fmv.memory.stringValue = ...

Client
  dim fm as new FileMappingMBS
  fm.OpenSharedMemory(idxxx)  
  dim fmv as FileMappingViewMBS = fm.MapView(0,size)
  dim data as memoryblock = fm.memory // keep the memory block
  fm.DeleteSharedMemory(idxxx)  // destroy the FileMapping object
  // is our data memory block still valid?

  
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] FileMapping : Detach memoryblock?

2014-06-20 Thread Michael Diehr
Thanks - perhaps the documentation should be updated for the next release then 
if it's not working well...

On Jun 20, 2014, at 2:01 PM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 
 Am 20.06.2014 um 22:57 schrieb Michael Diehr m...@xochi.com:
 
 If I do this, the data ends up blank on the receiving end:
 
   dim m as memoryblock (...)
   fm.CreateMemoryblock(id, m.size)
   fm.deleteSharedMemory=false // the receiver will handle deleting it
   (...)
   fmv = fm.MapView(m,0,m.size)  // pass in our memoryblock
 
 
 here we suggest the OS to use a given address from memoryblock, but that 
 fails as far as I see as the memory is already allocated. 
 So the feature may be useless in Xojo.
 
 Sincerely
 Christian
 
 -- 
 Read our blog about news on our plugins:
 
 http://www.mbsplugins.de/
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] PictureMBS.ScaleMT on Win32 with New-Style pictures?

2014-06-16 Thread Michael Diehr
Hi Christian,

Any update on PictureMBS with 32-bit pictures under Win32?   

I'm testing the latest Xojo beta with 14.2 pr10 and seeing this:

dim p as new picture(256,256)
dim pmbs as new PictureMBS(p,p.hasAlphaChannel)

// on Cocoa, pmbs.valid = true
// on Win32, pmbs.valid = false

It would be great if you could get this working... any ideas?  if this is a 
Xojo bug, has it been reported to them yet?



On Sep 27, 2013, at 10:08 AM, Christian Schmitz 
supp...@monkeybreadsoftware.de wrote:

 
 Am 27.09.2013 um 19:05 schrieb Michael Diehr m...@xochi.com:
 
 You are testing with GDI+ enabled in the application, right?  I wonder if in 
 multi-threaded code, you might need to call  GdiplusStartup(gdiplusToken, 
 gdiplusStartupInput, NULL) in each thread?
 
 Well, I would expect GdiplusStartup is called by Xojo before they create GDI+ 
 pictures.
 
 Or is the problem that it doesn't even work in the main thread at all?
 
 
 Yes. Main thread is the problem.
 
 Greetings
 Christian
 
 -- 
 Read our blog about news on our plugins:
 
 http://www.mbsplugins.de/
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] OverlayMBS and 32-bit pictures on Win32?

2014-06-16 Thread Michael Diehr
Hi Christian,

When I try to use OverlayMBS with 32-bit pictures on Win32 builds with GDI+ 
enabled, nothing is showing.  Could you see about fixing that?  Thanks,
-mike
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] ZipMBS and Zip64 support?

2014-06-04 Thread Michael Diehr
I did try that but it didn't seem to change the version # output - does it 
work?  

If so, what do we pass for versionMadeBy? The Zip specification lists that as 
a 2-byte value, not a Uint32...

Also, I was not sure what to pass for default values for strategy, password, 
crcForCtyping, and also for flagBase.   

Could you give an example?


On Jun 4, 2014, at 2:53 AM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 
 Am 03.06.2014 um 23:54 schrieb Michael Diehr m...@xochi.com:
 
 Christian - perhaps you could offer us some control over the version # 
 that's output in the zip files?
 
 
 Well, the CreateFile function has several variants and one is with 
 versionMadeBy as integer. Maybe that helps?
 
 CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as 
 string, ExtraGlobal as string, Comment as String, CompressionMethod as 
 integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as 
 integer, MemLevel as integer, Strategy as integer, Password as string, 
 crcForCtypting as UInt32, versionMadeBy as UInt32, flagBase as UInt32)
 
 Sincerely
 Christian
 
 -- 
 Read our blog about news on our plugins:
 
 http://www.mbsplugins.de/
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] OverlayMBS and Threads in Win32

2013-10-11 Thread Michael Diehr
Christian, I'm running into an issue with OverlayMBS plugins in threaded win32 
apps, perhaps you can see if this is fixable on your end?

See feedback://showreport?report_id=30124

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] PictureMBS.ScaleMT on Win32 with New-Style pictures?

2013-09-27 Thread Michael Diehr
You are testing with GDI+ enabled in the application, right?  I wonder if in 
multi-threaded code, you might need to call  GdiplusStartup(gdiplusToken, 
gdiplusStartupInput, NULL) in each thread?

Or is the problem that it doesn't even work in the main thread at all?
 
On Sep 23, 2013, at 2:36 AM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 
 Am 23.09.2013 um 03:24 schrieb Michael Diehr m...@xochi.com:
 
 I'm just guessing here, as I've never used GDI+ from C myself.
 
 Error 2 is 
 InvalidParameter according to 
 http://msdn.microsoft.com/en-us/library/windows/desktop/ms534175(v=vs.85).aspx
 Indicates that one of the arguments passed to the method was not valid.
 
 Yes. I once got it work, but failed later. Not sure why.
 
 Are you making a new BitmapData object for bitmapdata2?  
 
 
 yes, a few lines before:
 
 BitmapData* bitmapData2 = new BitmapData();
 DebugMessage(bitmapData2, (void*)bitmapData2);
 if (bitmapData2)
 
 Greetings
 Christian
 
 -- 
 Read our blog about news on our plugins:
 
 http://www.mbsplugins.de/
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] PictureMBS.ScaleMT on Win32 with New-Style pictures?

2013-09-22 Thread Michael Diehr
I'm just guessing here, as I've never used GDI+ from C myself.

Error 2 is 
InvalidParameter according to 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms534175(v=vs.85).aspx
Indicates that one of the arguments passed to the method was not valid.

Are you making a new BitmapData object for bitmapdata2?  



On Sep 22, 2013, at 9:19 AM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 
 Am 22.09.2013 um 18:13 schrieb Michael Diehr m...@xochi.com:
 
 As I understand it, the new-style picture images require gdiplus (GDI+) and 
 may require some different flags sent to the API
 I see some examples discussing related issues…
 
 
 Current code looks like this:
 
 GpStatus e = _GdipBitmapLockBits(g, r, flags, PixelFormat32bppPARGB, 
 bitmapData2);
 DebugMessage(e,e);
 if (e == 2)
   {
   e = _GdipBitmapLockBits(g, r, flags, PixelFormat32bppARGB, 
 bitmapData2);
   DebugMessage(e,e);
   }
 if (e == 2)
   {
   DebugMessage(Try ARGB read and write);
   e = _GdipBitmapLockBits(g, r, ImageLockModeRead|ImageLockModeWrite, 
 PixelFormat32bppARGB, bitmapData2);
   DebugMessage(e,e);
   }
 
 So I try already several combinations.
 Flags should be ImageLockModeRead or ImageLockModeWrite depending on mode.
 
 Greetings
 Christian
 
 -- 
 Read our blog about news on our plugins:
 
 http://www.mbsplugins.de/
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] PictureMBS.ScaleMT on Win32 with New-Style pictures?

2013-09-21 Thread Michael Diehr
I'm testing Xojo 2013 R3 with MBS 13.2 (release version).

On Cocoa, I'm using PictureMBS.ScaleMT, and seems to work OK with the new style 
pictures that are created with New Picture(width,height)

On Windows, I'm getting blank images (all zeros) in the scaled pictures.

Should PictureMBS.ScaleMT work in Win32 builds with new-style picture objects?

Thanks
-mike



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] QTKitMovieMBS on thread

2013-07-26 Thread Michael Diehr
Is it possible to create one QTKitMovieMBS in the main thread, but then, in a 
thread, change which movie file the movie points to?  In other words, I want to 
process a bunch of different movies inside a thread and I'm wondering if I can 
just create one movie object outside the thread, then re-use it in the thread?
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] QTKitMovieMBS.FrameImageAtTime is very slow

2013-07-26 Thread Michael Diehr
I'm updating my code from Carbon to Cocoa, and finding a dramatic slowdown when 
using QTKitMovieMBS to get a movie frame, as opposed to EditableMovie.Picture

With this code:

  while currentTime = maxTime

#if TargetCocoa
  dim p as picture
  dim qttime as QTKitTimeMBS = new QTKitTimeMBS(currentTime,600) // time @ 
timescale
  dim nsi as NSImageMBS = qm.FrameImageAtTime(qttime)
  p = nsi.copyPicture
#else // carbon or win32
  em.Position = currentTime
  dim p as picture = em.Picture
#endif
dim p2 as new picture(128,128,32)
p2.graphics.drawPicture p,0,0,p2.width,p2.height,0,0,p.width,p.height // 
stretch p onto p2's size
currentTime = currentTime + frameDuration
  wend

I'm seeing that the Carbon version is about 20x faster than the Cocoa version.  

Any idea why?  
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] EditableMovie.Picture = nil in Cocoa builds

2013-07-15 Thread Michael Diehr
Christian, FYI see 
https://forum.xojo.com/2971-editablemovie-picture-fails-in-cocoa

If there was a way to work around this issue in Cocoa builds using MBS plugins, 
it would be great.

I tried FolderItem.OpenMovieMBS but the movie object returned still has a nil 
handle, and returns Nil when you call Movie.Picture() or Movie.GetPictureMBS()

Any ideas?

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] [ANN] 13.2pr4

2013-06-04 Thread Michael Diehr
 * Fixed bug in Cocoa exception handling from pr3.

Can you say more about how to use this, and what the pr3 bug was?  Or is that 
detailed in the release notes?
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] PictureMBS with 32-bit Pictures

2013-06-02 Thread Michael Diehr
On Jun 1, 2013, at 8:52 AM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 
 Am 01.06.2013 um 02:13 schrieb Michael Diehr m...@xochi.com:
 
 Now that Real/Xojo is supporting true 32-bit pictures with alpha, is there 
 any way to get the PictureMBS class to work with them?
 
 
 I'll update the constructor to accept them.
 
 Just because data is premultiplied most functions won't work correct.
 Of course if you ignore alpha, that's not a problem.

For the MBS documentation, can you add notes that explain if/when the data 
returned will (or will not) be premultiplied alpha?

For example, I believe that Picture.RGBSurface.Pixel(x,y) does not return 
premultiplied alpha, though I'm not 100% sure at the moment.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] DE vs US servers

2013-06-02 Thread Michael Diehr
Christian, 

FYI, I'm getting faster download speeds (about 2x to 3x faster) using the .DE 
server than the .US one, even though I'm located on the west coast of the USA.


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Picture.CopyARGBToMemoryBlock?

2013-05-31 Thread Michael Diehr
Is there a MBS plugin which supports the new 32-bit with alpha Xojo pictures?

I'd like to make a single call such as:
 Picture.CopyARGBToMemoryBlock(memoryBlock,offset)
and get all 32 bits of color data copied.

For now I can probably do it with two separate calls, e.g.:

  pic.CopyXRGBtoMemoryblockMBS(d,0)
  pic.mask.CopyAtoMemoryblockMBS(d,0,0)

but having it in a single call would be nice
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] HTMLViewer.RenderWebsiteImageMBS is slow

2012-12-28 Thread Michael Diehr
I'm using HTMLViewer.RenderWebsiteImageMBS and finding that it's taking 300msec 
to render the image, even though the window is only 400x300pixels in size, on a 
brand new retina book running 10.8.2 with Safari 6.0.2.

I've tried some variations such as 

  dim nsv as NSViewMBS = me.mainFrameMBS.frameView.documentView
  dim ns as NSImageMBS = nsv.RenderImage(false)
  p = ns.CopyPicture

but it's still very slow.

By contrast, I can take a screenshot of the same window  using 
Window.ScreenshotWindowRectMBS and this takes less than 1msec.  However, when 
doing this, some of the content such as quicktime or flash plugins are not 
showing up, so I can't use it.

Is there any way to speed up HTMLViewer.RenderWebsiteImageMBS?

Or, is there any way to make Window.ScreenshotWindowRectMBS() capture 
everything in a HTMLViewer?



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] OverlayMBS update and resize?

2012-12-22 Thread Michael Diehr
In an OverlayMBS, I'm finding it impossible to simultaneously update the 
pictures AND change the window bounds.  I always get a single update in which 
either the picture is blank (drawing white) or the picture is not yet updated 
and thus is stretched to the wrong size.   I've tried various combinations of 
.Update, .Resize and .Move under Cocoa with 2012 R2.

Is there a workaround, or can you add an UpdateAndSetBounds() method that does 
this?  
thank you

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Cocoa: OpenAsMovieMBS doesn't work but OpenAsMovie does?

2012-12-19 Thread Michael Diehr
Under Cocoa (10.8.2) and MBS 12.5 with RB 2012 R2, it seems that OpenAsMovieMBS 
returns a movie object with .handle=nil, yet the regular old OpenAsMovie works 
just fine. 

This seems backwards to me. 


  dim f as FolderItem = GetOpenFolderItem()
  if f = nil then return

// this code works in Carbon, but not in Cocoa
  dim m as movie = f.OpenAsMovieMBS
  dim h as integer = m.Handle  // is zero
  dim p as picture =m.MoviePictureMBS(0)  // is nil
  p =m.MoviePictureMBS(2)  // is nil
  p = m.PosterPictureMBS  // is nil
  
// this code works in Cocoa
  m = f.OpenAsMovie
  h = m.Handle   // not zero
  p =m.MoviePictureMBS(0)  // valid picture
  p =m.MoviePictureMBS(2)  // valid picture
  p = m.PosterPictureMBS   // valid picture

// this code works in Carbon but not Cocoa:
  dim em as EditableMovie
  em = f.OpenEditableMovie
  p = em.Poster // nil
  p = em.PosterPictureMBS// nil
  p = nil// nil




___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Cocoa: OpenAsMovieMBS doesn't work but OpenAsMovie does?

2012-12-19 Thread Michael Diehr
On Dec 19, 2012, at 8:27 AM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 
 Am 19.12.2012 um 15:34 schrieb Michael Diehr m...@xochi.com:
 
 Under Cocoa (10.8.2) and MBS 12.5 with RB 2012 R2, it seems that 
 OpenAsMovieMBS returns a movie object with .handle=nil, yet the regular old 
 OpenAsMovie works just fine. 
 
 
 I just reported case 23472 for this.

Thanks!
23472 is not your report - did you mean # 23953 perhaps?

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Determine # of CPU cores or hyperthreads?

2012-12-16 Thread Michael Diehr
Thanks!

I want to know the # of Cores so I have an idea how many copies of a background 
helper app to launch.  1 for 2 cores, 2 for 3 cores, etc.

On Dec 15, 2012, at 3:06 PM, Christian Schmitz supp...@monkeybreadsoftware.de 
wrote:

 
 Am 15.12.2012 um 23:25 schrieb Michael Diehr m...@xochi.com:
 
 Is there a way to determine either the # of actual CPU cores or # of virtual 
 cores (in case the CPU has hyper threading?)
 Desired on OS X and Win32.
 
 
 A little thing: Added.
 
 You can test with next prerelease.
 
 Greetings
 Christian
 
 -- 
 Read our blog about news on our plugins:
 
 http://www.mbsplugins.de/
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Getting and setting ARGB data from new style pictures?

2012-12-16 Thread Michael Diehr
RB now supports true 32 bit pictures where the mask is part of the picture 
data, obtained by calling
  new picture (width, height)
rather than 
  new picture (width,height,depth)

Is there a MBS function get or set the ARGB data that's being used in new-style 
picture objects?

The documentation for 
Picture.CopyARGBtoMemoryblockMBS(destination as memoryblock, offset as integer, 
LittleEndian as boolean, AlphaValue as integer) as boolean

suggests that it does not copy the alpha channel at all.


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Determine # of CPU cores or hyperthreads?

2012-12-15 Thread Michael Diehr
Is there a way to determine either the # of actual CPU cores or # of virtual 
cores (in case the CPU has hyper threading?)
Desired on OS X and Win32.

Thx
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] “Autoreleased with no pool” messages

2012-09-23 Thread Michael Diehr
On Sep 22, 2012, at 8:04 AM, Christian Schmitz wrote:

 
 Am 22.09.2012 um 13:19 schrieb Arnaud Nicolet anic...@mac.com:
 
 Greetings,
 
 I've been getting the messages quoted below in the Console. I'm guessing it 
 comes from some methods in the plugin (MBS). Is it safe to ignore?
 
 
 It's leaking.
 
 Well, newer Real Studio versions and/or newer Mac OS X versions install an 
 Autorelease Pool.
 
 You can manually add a line to app.open like

What consequences does this have?  Does it suppress the messages in the console 
log?  Anything else?

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] feedback://showreport?report_id=21829

2012-08-21 Thread Michael Diehr
Hi Christian,

Please see feedback://showreport?report_id=21829 which may identify an issue 
with 12.3 and the latest beta of RB regarding window.top coordinates with 
OverlayMBS.

Thanks,
-mike

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Restart app on Mac.rbp - anything like this for Windows?

2012-06-03 Thread Michael Diehr
On May 29, 2012, at 11:08 PM, Oliver Osswald wrote:

 Windows has no problem with having both running.


Neither does mac os x.  You can simply use

 open -n  /path/to/app
to open a new instance of an already running app.

So a one-liner on mac would be :

 shell.execute open -n  + 
MyApp.folderItem.child(Contents).child(myAppName).posixPath

Beware, the -n switch is doesn't exist in older OS X (I think it was introduced 
in 10.5)

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Crash in MBS 10.1 / FolderItem.CommentMBS under 10.7.3

2012-03-09 Thread Michael Diehr
Just received a customer complaint of a new crash.  This is happening in a 
recursive zip utility I wrote and appears to be getting triggered on this line:

  dim zi as new ZipFileInfoMBS
  [...]
  zi.ExternalFileAttributes = flags
  zi.DosDate = 0
  z.CreateFile(relativePath + 
fSrc.name,zi,,,fSrc.CommentMBS,z.MethodDeflated, 
z.CompressionBestCompression) // CRASH
   

Using MBS 10.1 under RB 2010R1 / carbon build.

Looks to me like CommentMBS is calling out to AppleEvents and that's crashing?  
Perhaps this is something that used to be OK in a thread, but is no longer 
thread-safe under 10.7?


Thread 8 Crashed:
0   com.apple.JavaScriptCore0x9426b32d 
JSC::ConservativeRoots::add(void*, void*) + 61
1   com.apple.JavaScriptCore0x9426b22f 
JSC::MachineThreads::gatherFromCurrentThread(JSC::ConservativeRoots, void*) + 
111
2   com.apple.JavaScriptCore0x9426b143 
JSC::MachineThreads::gatherConservativeRoots(JSC::ConservativeRoots, void*) + 
35
3   com.apple.JavaScriptCore0x9426ada4 JSC::Heap::markRoots() + 132
4   com.apple.JavaScriptCore0x944387d7 
JSC::Heap::collect(JSC::Heap::SweepToggle) + 39
5   com.apple.JavaScriptCore0x9426abf1 
JSC::Heap::collectAllGarbage() + 49
6   com.apple.JavaScriptCore0x9426a9be 
JSC::DefaultGCActivityCallbackPlatformData::trigger(__CFRunLoopTimer*, void*) + 
190
7   com.apple.CoreFoundation0x95aa8656 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
8   com.apple.CoreFoundation0x95aa7fe7 __CFRunLoopDoTimer + 743
9   com.apple.CoreFoundation0x95a86f70 __CFRunLoopRun + 1888
10  com.apple.CoreFoundation0x95a8647c CFRunLoopRunSpecific + 332
11  com.apple.CoreFoundation0x95a86328 CFRunLoopRunInMode + 120
12  com.apple.HIToolbox 0x93ef517f RunCurrentEventLoopInMode + 
318
13  com.apple.HIToolbox 0x94091eb5 GetNextEventMatchingMask + 
493
14  com.apple.HIToolbox 0x9409221b WNEInternal + 434
15  com.apple.HIToolbox 0x9409228a _AEWNE + 58
16  com.apple.AE0x996c764b aeSend + 558
17  com.apple.HIToolbox 0x93f85ac7 AESend + 86
18  MBS REALbasic Mac Plugin.rbx_12.dylib   0x03c3a718 0x3c39000 + 5912
19  MBS REALbasic Mac Plugin.rbx_12.dylib   0x03c3ac02 0x3c39000 + 7170
20  com.iscreensaver.designer   0x0032132c 
_Globals9.$CommentMBS%s%oFolderItem + 87
21  com.iscreensaver.designer   0x00a39f21 
Utils.RecursiveZip%s%oZipMBSsoFolderItemoFolderItembbu8u8i4i4boProgressBaroStaticTexti4i4
 + 10832
22  com.iscreensaver.designer   0x00a3df6f 
Utils.RecursiveZip%s%oZipMBSsoFolderItemoFolderItembbu8u8i4i4boProgressBaroStaticTexti4i4
 + 27294
23  com.iscreensaver.designer   0x00a3df6f 
Utils.RecursiveZip%s%oZipMBSsoFolderItemoFolderItembbu8u8i4i4boProgressBaroStaticTexti4i4
 + 27294
24  com.iscreensaver.designer   0x00a3df6f 
Utils.RecursiveZip%s%oZipMBSsoFolderItemoFolderItembbu8u8i4i4boProgressBaroStaticTexti4i4
 + 27294
25  com.iscreensaver.designer   0x00c2bdd2 
cBuilder.MakeInstallerMac%s%ocBuilderocTarget + 19750
26  com.iscreensaver.designer   0x00c46dd2 
cBuilder.ThreadedBuild%%ocBuilder + 6306
27  com.iscreensaver.designer   0x00c1eb2f 
cBuilder.Event_Run%%ocBuilder + 294
28  rbframework.dylib   0x010d2a21 threadRun + 633
29  com.apple.CoreServices.CarbonCore   0x933589fe CooperativeThread + 308
30  libsystem_c.dylib   0x9821bed9 _pthread_start + 335
31  libsystem_c.dylib   0x9821f6de thread_start + 34

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Crash in MBS 10.1 / FolderItem.CommentMBS under 10.7.3

2012-03-09 Thread Michael Diehr
On Mar 9, 2012, at 8:56 AM, Christian Schmitz wrote:

 
 Am 09.03.2012 um 17:32 schrieb Michael Diehr:
 
 Looks to me like CommentMBS is calling out to AppleEvents and that's 
 crashing?  Perhaps this is something that used to be OK in a thread, but is 
 no longer thread-safe under 10.7?
 
 
 Does it happen if you don't use threads?

I'm not seeing the crash on either 10.6.8 or 10.7.3, so I'm suspecting it's a 
3rd party extension conflict.   Awaiting customer feedback.

I can probably just remove this line, since this is an in-app zipper and we 
really don't care if the folderItem comments are included in the first place.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] HTMLViewer.EvaluateJavaScriptMBS memory Leak?

2012-02-04 Thread Michael Diehr
On Feb 4, 2012, at 12:12 PM, Christian Schmitz wrote:

 
 Am 04.02.2012 um 17:39 schrieb Michael Diehr:
 
 Hi Christian,
 
 I've discovered what I believe is a small but troubling memory leak in the 
 method 
 HTMLViewer.EvaluateJavaScriptMBS on mac and the corresponding function 
 IERunJavaScriptMBS.
 
 Okay, could you make a sample project reproducing it?

It's very easy to reproduce (sent you a project offlist).

this will do it:

Timer1.action
  dim s as string = htmlviewer1.EvaluateJavaScript(return 
'';)

The speed of the leak seems proportional to the size of the string returned.  
So my guess is that the string being returned from javascript to RB is not 
being freed ever.


 I can't reproduce it here easily, but that may be due the setup with 12.1pr1 
 plugins, RS 2011r4 and Mac OS X 10.7.2.


Tested and leaking with 10.6.8 and MBS 12.1pr1


 In tests where I call either function about 50 times per second with small 
 commands, I'm seeing leaks that can be as fast as 100KB/second.   The 
 commands are short javascript functions which query the play status of a 
 plugin (flash or quicktime or html5 video).
 
 Well, NSAutoreleasePoolMBS class exists and may be useful on Mac if that is 
 due to a pool not being cleared.
 
 Since it's leaking on both Mac and Windows when querying either SWF or 
 QuickTime or HTML5 video objects, this suggests to me that like the leak may 
 be in MBS, rather than, say a leak in IE or WebKit or just Flash or 
 QuickTime plugins.
 
 You can use Instruments.app (coming with Xcode) to find the source of the 
 leak.
 
 * can you see an obvious place in your code where the leak is happening?  
 
 No.
 
 * can you fix it?
 
 No.
 
 * if so, can I pay you to make a custom build of 10.1 (I need to issue a 
 quick update of my software to fix this and prefer to not update to a later 
 MBS for obvious unit-test reasons).
 
 We could discuss that off list, but I bet it'll be a lot of work.

let's see how it goes?

 
 n.b.:  the leaked memory appears to be released if I reload a blank page in 
 the HTMLViewer (on mac) or if I issue htmlViewer.close (win32).   Although 
 this is a workaround for the leak, there are cases where it's not practical 
 to reload the page as some customers expect the software to be running 24/7 
 without interruption.
 
 
 Not sure what you do, but you could at least measure free memory with other 
 plugin functions.
 So you could warn user or restart app when memory is low and you have a 
 chance to do so.

unfortunately it's an automated process that runs w/o user intervention.


 
 Greetings
 Christian
 
 -- 
 See you in Orlando, Florida for Real World 2012
 
 More details and registration here:
 http://www.realsoftware.com/community/realworld.php
 
 
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] HTMLViewer.EvaluateJavaScriptMBS memory Leak?

2012-02-04 Thread Michael Diehr
On Feb 4, 2012, at 2:38 PM, Michael Diehr wrote:
 [...]
 Timer1.action
  dim s as string = htmlviewer1.EvaluateJavaScript(return 
 '';)
 
 The speed of the leak seems proportional to the size of the string returned.  
 So my guess is that the string being returned from javascript to RB is not 
 being freed ever.

More testing ...  these two different javascript commands both leak at the same 
speed, so I think perhaps it's the string being passed in to the command that 
leaks, not the string being returned:

Timer1.action  
  static xxx as string // a long string to leak memory faster
  if xxx =  then  // initialize first time only
for i as integer = 1 to 1000
  xxx = xxx + 0
next
  end if
  
  if Keyboard.AsyncShiftKey then // toggle the shift key at runtime to test 
options
cmd = var x = ' + xxx + '; return '' ;
  else
cmd = return ' + xxx + ';
  end if

  result = htm.EvaluateJavaScriptMBS(cmd)
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Third-party software conflict with GrowIconMBS?

2012-01-12 Thread Michael Diehr
I have a user reporting a crash (nil object exception) in 10.6.3 in some code 
of mine that uses GrowIconMBS.
He's got a whole bunch of haxie-type things installed, so I'm trying to narrow 
it down to see what the culprit is.

Anyone seen this?

He's got the following installed...
Flip4Mac
Growl
MacFUSE
PenTablet
RightZoom
Spelling
TeXDistPrefPane
Tuxera NTFS

and some others.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] PictureMBS.ScaleMT hanging

2011-12-14 Thread Michael Diehr
Hi Christian,

I'm seeing some pretty serious hangs when using PictureMBS.ScaleMT -  the hang 
appears to be caused by one of the subthreads getting stuck in a semaphore wait 
condition.   Consequences are that the app can not quit or be killed without 
great effort.

I've not isolated the cause of the bug, but I have some theories:

* out of memory when using very large pictures and passing nil as the temporary 
picture?

* calling scaleMT when an existing scaleMT operation is already in progress?  

If I can identify it, I'll report it directly, but for the moment I'm a bit 
afraid to use ScaleMT since the hang is so disruptive...

Here's an example where I sampled the app while hung:

  Thread 35fc11
  User stack:
1 thread_start + 34 (in libSystem.B.dylib) [0x974c30de]
  1 _pthread_start + 345 (in libSystem.B.dylib) [0x974c3259]
1 CooperativeThread + 309 (in CarbonCore) [0x96d29847]
  1 threadRun + 600 (in rbframework.dylib) [0x12b3e0e]
1 cStage.Event_Run%%ocStage + 1971 (in iScreensaver Designer 
5.debug) [0x999a5b]
  1 
cStage.TransitionThread%%ocStageoSequenceItemoSequenceItem + 14061 (in 
iScreensaver Designer 5.debug) [0x9abd76]
1 SeqMedia.GetTexture%oGLTex%oSeqMediabboGLEffectCanvas + 
3740 (in iScreensaver Designer 5.debug) [0xcbc628]
  1 
SeqMedia.GetTexture_Run%oGLTex%oSeqMediaboGLEffectCanvas + 2181 (in 
iScreensaver Designer 5.debug) [0xcb8c45]
1 GLTex.MakeFromPicture%%oGLTexoPicturebc + 4841 (in 
iScreensaver Designer 5.debug) [0xaf78ee]
  1 
Utils.StretchPictureToMemoryBlockYielding%oMemoryBlock%oPicturei4Utils.eStretchi4i4bi4i4
 + 17199 (in iScreensaver Designer 5.debug) [0xba21b2]
1 
PictureMBS.ScaleMT%b%oPictureMBSi4oPictureMBSoPictureMBSi4i4i4 + 160 (in 
iScreensaver Designer 5.debug) [0x3711e2]
  1 ??? (in MBS Real Studio LargePicture 
Plugin.rbx_0.dylib + 59437) [0x263682d]
1 ??? (in MBS Real Studio LargePicture 
Plugin.rbx_0.dylib + 899215) [0x270388f]
  1 ??? (in MBS Real Studio LargePicture 
Plugin.rbx_0.dylib + 1214441) [0x27507e9]
1 semaphore_wait_signal_trap + 10 (in 
libSystem.B.dylib) [0x97495b42]
  Kernel stack:
1 semaphore_wait_continue + 0 [0x22a88f]

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] [ANN] 11.3pr14

2011-12-02 Thread Michael Diehr
  * Added new parameter to FileMappingMBS.MapView for passing own memory.

What's the syntax for this?  Is there an example or notes that I can refer to?  
Thanks.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Downsize large picture with yielding w/low memory usage?

2011-11-24 Thread Michael Diehr
On Nov 23, 2011, at 7:59 AM, Christian Schmitz wrote:

 
 Am 22.11.2011 um 17:30 schrieb Michael Diehr:
 
 * does not require tons of memory
 
 I'll reduce the Scaling method memory need.
 
 For some reason we used doubles there and now I simply use UInt8 which 
 reduces memory requirements by more than 80%.

That would help, thank you.

Would it be possible to make the yield ticks value into a yieldMilliseconds 
value instead?  Or, to be more backwards compatible, how about the yieldTicks 
value could be a double?

Internally, I wonder if there is any overhad difference between calling Ticks() 
vs. Microseconds() a lot?

Also - the MT - multithreaded version -- does it always use the current CPU 
thread?

It would be interesting to have a MT version which only used the other CPUs, 
leaving the current thread's CPU idle (to give time to the rest of the 
foreground threads). 
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Downsize large picture with yielding w/low memory usage?

2011-11-22 Thread Michael Diehr
I have a situation where I need to downsize a 1 x 1 pixel image down to 
roughly 4000 x 4000.
Right now I can do this with RB picture objects, but the call to 
.drawPicture(...) blocks for about 5000msec.  As I'm trying to maintain a 60fps 
openGL animation at the same time, this is a bit of a problem. :-)

I set up a test with PictureMBS.Scale.

I've tried ScaleFast(), and though it's very fast (about 21msec) the quality is 
too poor.

Testing shows that the .ScaleBox mode, the quality is good. However, with the 
giant image this was failing as it looks like the temporary scale buffer is 4x 
the size of the source picture?  (I'm seeing log messages about a 1.2 GB mmap 
call failing).  Speed is critical here so I don't want to use the disk-based 
options.

Q: is there any MBS call that will downsize a large image in the following way:
* can handle a 1x1 pixel image
* does not require tons of memory
* has a multi-threaded option / OR a yield option that can yield every 10msec 
or so.  (I think I need yielding more frequently than 1 tick, since I'm trying 
to maintain 60fps animation)
* fast/fair quality (like .ScaleBox )

If not,  I'm wondering if perhaps .scaleFast followed by a simple blur filter 
might do the trick?  Does MBS have a super fast blur filter?  


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] SystemInformationMBS.MacVRAMSize

2011-11-20 Thread Michael Diehr
Hi Christian... to follow up on an old thread.

I have a user with a macbook pro with 2 graphics cards (NVIDIA 9600 and NVIDIA 
9400).  The 9600 has 512MB of VRAM, yet SystemInformationMBS.MacVRAMSize is 
reporting 256MB.  (The user has verified that the 9600 is, indeed, active at 
the time).

Not a big deal, but might be nice to improve at some point.

Also, modern VRAM sizes are heading over 2GB, so this may need to return a 
UINT64 soon :)

On Feb 9, 2009, at 5:48 PM, Christian Schmitz wrote:

 Michael Diehr m...@xochi.com wrote:
 
 Christian, FYI it looks like you could change
   SystemInformationMBS.MacVRAMSize
 to
   SystemInformationMBS.VRAMSize
 
 and have it work on Win32 also (though DX10 may be required?)
 
 Well it looks to me that the whole Direct X initialization here is a
 little bit too much work for such a simple function.
 
 But maybe I'll soon find some sample code so at least the development
 for such a function is easier.
 
 The code in the microsoft page is not complete for me.
 
 Greetings
 Christian
 
 -- 
 Over 1100 classes with 22000 functions in one REALbasic plug-in. 
 The Monkeybread Software Realbasic Plugin v9.0. 
 
 http://www.monkeybreadsoftware.de/realbasic/plugins.shtml
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] PPC and old OS X support?

2011-11-12 Thread Michael Diehr
I'd like to use MBS 11.3 for my production application for a Carbon build in 
2011R3.  If I do this, are there any limitations on OS X support re: PPC 
support of OS X 10.4, 10.5 ?

I'd be upgrading from MBS 10.1 -- any changes since then?
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] OverlayMBS.Show : shows attached window, in Cocoa

2011-11-04 Thread Michael Diehr
Under Cocoa, calling OverlayMBS.Show  when the overlay is attached to a parent 
window, causes that parent window to come forward.

A while back, I had a similar issue with win32 builds, so you added 
WindowsShowMode as integer = 0 to that call so I could use SW_SHOWNOACTIVATE.

I'm wondering if you can add a similar feature for Cocoa?

thanks
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Beta plugin zip file including your build folders...

2011-10-26 Thread Michael Diehr
Hi Christian,

The .zip file for MBS 113pr10, when unzipped, gives me a 5 level folder 
hierarchy:

Users/cs/Development/RealbasicPlugin/Release/MBS-RB-Plugins113pr10

I think your zip command is not what you intended?


___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] [ANN] 10.2pr9

2011-07-19 Thread Michael Diehr
Christian -- email subject line says 10.2pr9  -- isn't this 11.2pr9? You 
might want to re-send a corrected version for the record...?


On Jul 15, 2011, at 7:09 AM, Christian Schmitz wrote:

 Hi,
 
 * Added CFArrayMBS Constructor to take string array.
 * Improved NSProcessInfoMBS, NSApplicationMBS and
  NSApplicationDelegateMBS classes and made in Mac OS X 10.7 ready.
 * Cocoa plugins now use memoryblocks for NSData objects.
 * Changed GetColorFromDrag methods in NSColorPanelMBS class to be shared
  methods.
 * Added DMMessageMBS.message function.
 * NSDockTileMBS and QTKitTrackMBS classes have now a private
  constructor.
 * Changed MenuIsVertical and MenuThickness methods to be shared methods
  in NSStatusItemMBS class.
 * Added more CLSamplerMBS methods.
 * Added QuartzFilterManagerMBS filtersInDomains and a few related
  constants.
 * Updater several plugin parts to use Real Studio arrays instead of own
  array classes: CalendarStore, DiscRecording and TCMPortMapping.
 * Removed array classes: QTKitFormatDescriptionArrayMBS,
  QTKitTrackArrayMBS, QTKitCaptureDeviceArrayMBS, DRDeviceArrayMBS,
  DRFSObjectArrayMBS, NSSpeechStringArrayMBS, CalStringArrayMBS,
  CalIntegerArrayMBS, CalNthWeekDayArrayMBS, CalAlarmArrayMBS,
  CalAttendeeArrayMBS, CalEventArrayMBS, CalTaskArrayMBS,
  CalCalendarArrayMBS, TCMPortMappingArrayMBS, WebArchiveArrayMBS,
  WebHistoryDateArrayMBS, WebResourceArrayMBS, WebFrameArrayMBS and
  WebHistoryItemArrayMBS.
 * Updated DynaPDF to version 3.0.7.14.
 * Added MediaKeysMBS class to catch special keys on the Mac keyboard
  like Play, Forward and Rewind.
 * Added NSCursorMBS operationNotAllowedCursor.
 * Fixed a few bugs with CGPDF* classes.
 * Updated QTKit Plugin for Mac OS X 10.7. Also added a few more methods
  and events. Also cleaned up old stuff.
 * Fixed a bug with XMPFilesMBS on Linux where it raised always some
  unneeded exception.
 * Add fullscreen functions to window class for Mac OS X 10.7.
 * Updated PDFKit plugin part for Mac OS X 10.7.
 
 Greetings
 Christian
 
 -- 
 Read our blog about news on our plugins:
 
 http://www.mbsplugins.de/
 
 ___
 Mbsplugins_monkeybreadsoftware.info mailing list
 mbsplugins@monkeybreadsoftware.info
 https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] CGContextGetColorTransform is obsolete

2011-07-06 Thread Michael Diehr
On Jul 6, 2011, at 4:04 AM, Christian Schmitz wrote:

 
 Am 06.07.2011 um 01:07 schrieb Michael Diehr:
 
 I'm seeing messages in the console that say CGContextGetColorTransform is 
 obsolete and will be removed...   I'm not using that call myself, but am 
 using MBS plugins that operate on CG stuff.   This is with MBS 10.1 in a 
 Carbon app.  
 
 What code is causing that?
 
 We don't use CGContextGetColorTransform as I don't find this function in our 
 code.

Ok - perhaps it's just something in the RB framework?  I'll do more digging.
___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] CGContextGetColorTransform is obsolete

2011-07-06 Thread Michael Diehr
On Jul 6, 2011, at 7:15 AM, Michael Diehr wrote:

 On Jul 6, 2011, at 4:04 AM, Christian Schmitz wrote:
 
 
 Am 06.07.2011 um 01:07 schrieb Michael Diehr:
 
 I'm seeing messages in the console that say CGContextGetColorTransform is 
 obsolete and will be removed...   I'm not using that call myself, but am 
 using MBS plugins that operate on CG stuff.   This is with MBS 10.1 in a 
 Carbon app.  
 
 What code is causing that?
 
 We don't use CGContextGetColorTransform as I don't find this function in our 
 code.
 
 Ok - perhaps it's just something in the RB framework?  I'll do more digging.

Found it -- it is caused by MBS plugin method:

 dim ns as NSImageMBS = HTMLViewer.RenderWebsiteImageMBS

triggers the issue.

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Several QT examples not working in Win32 in 2011 R2

2011-06-23 Thread Michael Diehr
On Jun 23, 2011, at 2:10 AM, Christian Schmitz wrote:

 
 Am 23.06.2011 um 04:44 schrieb Michael Diehr:
 
 Hi Christian,
 
 Using 2011 R2, with MBS 11.2pr4, I'm finding a few examples work fine on Mac 
 (Carbon) but are failing on Windows.
 
 QT Make Slide Show Movie.rbp  gives failed to flatten movie error.
 
 You know the difference between OpenAsMovie and OpenAsMovieMBS?
 
 On Windows OpenAsMovie does not really open the video as it does not know 
 whether to use QuickTime or Windows Media Player as long as you don't assign 
 it to a movieplayer. So OpenAsMovieMBS is recommended as it always opens the 
 video using QuickTime.

I'll try that, thank you.

Also:

 
 MovieExporter to MP4.rbp fails with Error on convering movie: -1

Seems to be a false alarm -- the problem was with the bad movie made using 
Make slide show movie app.

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Several QT examples not working in Win32 in 2011 R2

2011-06-22 Thread Michael Diehr
Hi Christian,

Using 2011 R2, with MBS 11.2pr4, I'm finding a few examples work fine on Mac 
(Carbon) but are failing on Windows.

QT Make Slide Show Movie.rbp  gives failed to flatten movie error.

MovieExporter to MP4.rbp fails with Error on convering movie: -1


I have QuickTime 7.6.9 installed, testing on Windows 7.

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] OverlayMBS.Height change buggy in Cocoa

2011-06-04 Thread Michael Diehr
On Jun 3, 2011, at 2:48 PM, Christian Schmitz wrote:

 
 Am 03.06.2011 um 21:44 schrieb Michael Diehr:
 
 Try this code in an OverlayMBS:...
 
 There is quite some math to do in Cocoa as the coordinate system is reverse 
 and we have to calculate the new total frame height where you only specify 
 the content height.
 
 I'll check that.

Thanks -- other than this one issue, the overlayMBS class seems to work well in 
Cocoa builds.
And it's fairly easy to attach overlayMBS windows to regular Cocoa Realbasic 
windows, too.

For MBS 11.x or 12.0, I'd suggest that you deprecate the OverlayWindowMBS class 
and suggest folks just use OverlayMBS for Win32 and Cocoa?

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] OverlayWindowMBS.AttachToWindow broken in Cocoa

2011-06-02 Thread Michael Diehr
On Jun 2, 2011, at 9:13 AM, Christian Schmitz wrote:

 
 Am 02.06.2011 um 18:05 schrieb Michael Diehr:
 
 Question:  is it possible with the REALbasic window class to draw 
 transparent background colors (e.g. to use an alpha value in the 
 window.paint or canvas.paint event) ?  If so, I could even use a normal 
 realbasic window...
 
 Well, in Carbon: yes if you use MakeTransparentMBS.
 
 For Cocoa I still need to find a way to enable it. Currently those windows 
 are marked as non transparent so no alpha gives you black.

Thanks.

To confirm: is it true that OverlayMBS internally uses an NSWindow?  Is that 
true in both Carbon and Cocoa builds?

If so, I would prefer to just move my code to OverlayMBS for all targets.

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info