I am creating a template for document creation, where I need to insert images of varying sizes (sometimes 1024px, sometimes ~4000px wide). Those images can be oriented both vertically and horizontally.
The problem is, I can't afford to have them shrunk (there is text in them).
Is there a way to force LaTeX to create a new page as big as the picture, which picture would fully fill?
I thought of a macro, which would end document style and temporarily use a different one (change pages to horizontal, change sizes...), but I don't think this would handle sizes well.
In the past, I did this manually via Adobe Acrobat (which was able to insert an image as an independent page with its own size). I use MiKTeX 2.9.

pdfpagesorstandalonedepending on what you want (include an image page to LaTeX or create a page reduced to the contents). – Schweinebacke Feb 03 '17 at 13:08About standalone package, I can't really imagine how would I use it. Ideally, I would like to create macro, which would take image.jpg(.png...) as an argument and create a new page, which would contain only image.jpg
– liskacek Feb 03 '17 at 14:44pdfpagescannot only insert PDFs but every image formatgraphicxcan import. Usingpdflatex,xelatexorlualatexyou can, e.g., also insert PNG or JPEG pages without loosing any pixel of the original file. – Schweinebacke Feb 04 '17 at 16:13