/// <summary> /// Download |imageUrl| and execute |callback| on completion with the images /// received from the renderer. If |isFavicon| is true (1) then cookies are /// not sent and not accepted during download. Images with density independent /// pixel (DIP) sizes larger than |maxImageSize| are filtered out from the /// image results. Versions of the image at different scale factors may be /// downloaded up to the maximum scale factor supported by the system. If there /// are no image results <= |maxImageSize| then the smallest image is resized /// to |maxImageSize| and is the only result. A |maxImageSize| of 0 means /// unlimited. If |bypassCache| is true (1) then |imageUrl| is requested from /// the server even if it is present in the browser cache. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>. /// </remarks> public void DownloadImage(string imageUrl, bool isFavicon, uint maxImageSize, bool bypassCache, CfxDownloadImageCallback callback) { var imageUrl_pinned = new PinnedString(imageUrl); CfxApi.cfx_browser_host_download_image(NativePtr, imageUrl_pinned.Obj.PinnedPtr, imageUrl_pinned.Length, isFavicon ? 1 : 0, maxImageSize, bypassCache ? 1 : 0, CfxDownloadImageCallback.Unwrap(callback)); imageUrl_pinned.Obj.Free(); }