> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ar/qaadh-almarfh/113-optimising-very-large-image-files.md).

# تحسين ملفات الصور الكبيرة جدًا

يمكن أن تؤدي ملفات الصور الكبيرة جدًا، أو ملفات الصور التي تستخدم تنسيقات ملفات غير مناسبة، إلى إطالة عملية التجميع بشكل كبير وقد تتسبب في انتهاء المهلة أثناء التجميع. تشرح هذه المقالة الإرشادية بعض الاقتراحات للتعامل مع ملفات الصور الكبيرة، وللاختيار بين تنسيقات ملفات الصور المناسبة.

بالنسبة إلى ملفات الصور الكبيرة (حيث يكون حجم كل منها أكبر من 1 ميجابايت)، نوصي بتغيير حجم الصور النقطية (بما في ذلك صور PDF النقطية) إلى، لنقل، 1200 بكسل عرضًا أو ارتفاعًا، بحيث تصبح أحجام الملفات أصغر. يمكنك القيام بذلك باستخدام برنامج لمعالجة الصور؛ أو إذا كنت تستخدم ImageMagick، فيمكنك استخدام الأمر [`convert` الأمر](http://www.imagemagick.org/Usage/resize). على نظام MacOS، فإن [`sips -Z` الأمر](http://lifehacker.com/5962420/batch-resize-images-quickly-in-the-os-x-terminal) مفيد جدًا.

يمكن أن تؤدي الصور الفوتوغرافية المحفوظة بصيغة `.png` أيضًا إلى أحجام ملفات كبيرة جدًا: `.jpg` عادةً ما يكون تنسيقًا أكثر كفاءة في استخدام المساحة بكثير لـ *الصور الفوتوغرافية*. *الرسومات الخطية، والرسوم البيانية، والمخططات* يُفضَّل حفظها بصيغة `.png` أو `.pdf`، بشكل عام. `.pdf` يمكن أيضًا أن يتم تجميع الصور بشكل أسرع مقارنةً بملفات `.png` إذا كانت أحجام ملفاتها متقاربة، لأن عملية التجميع عندئذٍ لن تحتاج إلى استدعاء `libpng`.

في حالة `.eps` للصور، نوصي بتحويلها إلى `.pdf`، لأن صيغة PDF غالبًا ما تؤدي إلى حجم ملف أصغر مع الحفاظ على الطبيعة المتجهية للرسومات الخطية. إن [`epstopdf` الأمر](https://www.ctan.org/pkg/epstopdf) مفيد؛ وستحتاج أيضًا إلى تثبيت GhostScript.

إذا كان لا بد من استخدام `.eps` صور في مشروعك، فقد يكون `.eps` الملف كبيرًا بشكل غير ضروري أحيانًا بسبب خلل/سوء إعداد في التطبيق الذي قام بتصديره. يمكنك محاولة تعديل إعدادات التصدير؛ أو محاولة إعادة معالجة الملف باستخدام GhostScript ومقارنة أحجام الملفات:

```
gs -o outputfile.eps -sDEVICE=epswrite originalfile.eps
```

إذا أردت تقليل بعض وقت التجميع/العرض أثناء العمل على مستندك، فيمكنك تشغيل وضع "المسودة" لجعل التجميع أسرع، وذلك بكتابة `\documentclass[draft]{…}` في إعلان فئة المستند. ومن خلال عدم عرض الصور داخل ملف PDF (وبعض الأشياء الأخرى)، يمكن أن يساعد خيار "draft" غالبًا في تقليل وقت التجميع، وهو أمر مفيد عند العمل على مستندات كبيرة.

يمكنك أيضًا تشغيل/إيقاف الرسومات لجزء محدد من المشروع الذي تعمل عليه:

```latex
\setkeys{Gin}{draft=false}
...سيتم عرض أي \includegraphics هنا بكامل أناقته، بحيث
يمكنك التحقق من الصور في هذا الجزء من المستند..
\setkeys{Gin}{draft}
...سيتم عرض أي \includegraphics هنا فقط كإطار فارغ.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ar/qaadh-almarfh/113-optimising-very-large-image-files.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
