Skip to content

Error when saving a bigger image #189

@milanm

Description

@milanm

We use the context menu (v4.0.4) like this:

import contextMenu from 'electron-context-menu'

let win: BrowserWindow | null

const windowConfig = {
  title: 'My App',
  icon: '../favicon.ico',
  width: 1300,
  height: 700,
  autoHideMenuBar: true,
  webPreferences: {
    preload: path.join(__dirname, 'preload.js')
  }
}

contextMenu({
  showInspectElement: false,
  showSearchWithGoogle: false,
  showSaveImageAs: true,
  showLearnSpelling: false,
  showLookUpSelection: false,
  prepend: (defaultActions, params) => [
    {
      label: 'Open in New Window',
      visible: params.linkURL.length > 0,
      click: () => {
        const newWin = new BrowserWindow(windowConfig)
        newWin.loadURL(params.linkURL)
      }
    }
  ]
})

However, when we try to save an image bigger then (let say 2Mb), we get the following error:

image

What could be the cause?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions