{"record":{"id":"cf435f1db678b04f","repo":"quasarframework/quasar","slug":"correction-on-padding-for-file-relativename-due","errorCode":null,"errorMessage":"Correction on padding for ${file.relativeName} due to padding exceeding file's dimension of ${size}x${size}px","messagePattern":"Correction on padding for (.+?) due to padding exceeding file's dimension of (.+?)x(.+?)px","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"icongenie/lib/utils/get-square-icon.js","lineNumber":28,"sourceCode":"  const img = icon.clone()\n  let width = size - 2 * horiz\n  let height = size - 2 * vert\n  const corrections = []\n\n  if (width <= 0) {\n    width = size\n    horiz = 0\n    corrections.push('width')\n  }\n\n  if (height <= 0) {\n    height = size\n    vert = 0\n    corrections.push('height')\n  }\n\n  if (corrections.length !== 0) {\n    warn(\n      `Correction on padding for ${file.relativeName} due to padding exceeding file's dimension of ${size}x${size}px`\n    )\n  }\n\n  img.resize({\n    width,\n    height,\n    fit: 'contain',\n    background\n  })\n\n  if (horiz > 0 || vert > 0) {\n    img.extend({\n      top: vert,\n      bottom: vert,\n      left: horiz,\n      right: horiz,\n      background","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/icongenie/lib/utils/get-square-icon.js#L10-L46","documentation":"getSquareIcon pads a source image to make it square before resizing. If the requested padding would exceed the image's dimensions of size x size px, the padding is corrected (width/height clamped, offset zeroed) and a warning is emitted listing which dimensions were corrected.","triggerScenarios":"Running icongenie with padding larger than the source image's dimensions, e.g. `icongenie g --padding 100` on an icon that is smaller than the target size, or a non-square image whose shorter side is exceeded by padding.","commonSituations":"Using a small source icon (e.g. 256px) with a large padding option, or padding values copied from a profile generated for larger source images.","solutions":["Reduce the padding value so padding stays within the source image dimensions","Provide a larger source icon (1024x1024 or bigger is recommended) matching the profile's declared dimensions","If the correction is acceptable, ignore the warning — icongenie clamps the padding automatically"],"exampleFix":"// before (256px source)\nicongenie g --icon icon.png --padding 96\n// after\nicongenie g --icon icon-1024.png --padding 16","handlingStrategy":"validation","validationCode":"import { imageSize } from 'image-size'\nconst dim = imageSize(sourceIconPath)\nconst padding = Number(profile.padding || 0)\nif (padding * 2 >= Math.min(dim.width, dim.height)) {\n  throw new Error(`Padding ${padding}px too large for ${dim.width}x${dim.height}px icon`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use a large square source icon (1024x1024+) as icongenie recommends","Keep padding well below half the source image's shorter side","Validate icon dimensions in CI before generation"],"tags":["icongenie","image-processing","padding"],"backgroundTag":"padding-exceeds-image-dimension","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}