Skip to content

Commit

Permalink
imagemagick no need on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
meowtec committed Sep 12, 2017
1 parent e5e7243 commit b68e5fa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/renderer/components/TargetTypeSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as os from 'os'
import * as React from 'react'
import { connect } from 'react-redux'
import { IState } from '../store/reducer'
Expand All @@ -20,7 +21,15 @@ class TargetTypeSelect extends React.PureComponent<ITargetTypeSelectProps, {}> {

render() {
const { sourceExt, targetExt, imageMagickInstalled } = this.props
const PNGDisabled = sourceExt === SupportedExt.jpg && !imageMagickInstalled

/**
* on the Mac, pngquant can read JPEG, so we don't need ImageMagick
* on other systems, ImageMagick should be installed independently
*/
const PNGDisabled =
os.platform() !== 'darwin' &&
sourceExt === SupportedExt.jpg &&
!imageMagickInstalled

return (
<select style={{width: 62}} value={targetExt} onChange={this.handleChange}>
Expand Down

0 comments on commit b68e5fa

Please sign in to comment.